IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42073


Ignore:
Timestamp:
Feb 28, 2022, 10:52:06 AM (4 years ago)
Author:
eugene
Message:

add code to calculate averages for the radial aperture mags

Location:
branches/eam_branches/ipp-20211108/Ohana/src/relphot
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/Ohana/src/relphot/Makefile

    r41647 r42073  
    5454$(SRC)/save_images.$(ARCH).o     \
    5555$(SRC)/MagResidSave.$(ARCH).o    \
     56$(SRC)/setXradAverages.$(ARCH).o         \
     57$(SRC)/lensing.$(ARCH).o         \
    5658$(SRC)/synthetic_mags.$(ARCH).o  \
    5759$(SRC)/plot_scatter.$(ARCH).o    \
     
    117119$(SRC)/save_images.$(ARCH).o     \
    118120$(SRC)/MagResidSave.$(ARCH).o    \
     121$(SRC)/setXradAverages.$(ARCH).o         \
     122$(SRC)/lensing.$(ARCH).o         \
    119123$(SRC)/load_catalogs.$(ARCH).o   \
    120124$(SRC)/reload_catalogs.$(ARCH).o \
  • branches/eam_branches/ipp-20211108/Ohana/src/relphot/include/relphot.h

    r41672 r42073  
    486486char  *OUTROOT;
    487487char  *UPDATE_CATFORMAT;
     488int    UPDATE_XRAD;
    488489int    PLOTDELAY;
    489490int    UpdateAverages;
     
    877878
    878879int MagResidSave(char *filename, Catalog *catalog);
     880int setXradAverages (Catalog *catalog);
    879881
    880882void ResetAverageAndMeasure (Catalog *catalog);
  • branches/eam_branches/ipp-20211108/Ohana/src/relphot/src/args.c

    r41891 r42073  
    259259    UPDATE_CATFORMAT = strcreate (argv[N]);
    260260    remove_argument (N, &argc, argv);
     261  }
     262
     263  UPDATE_XRAD = FALSE;
     264  if ((N = get_argument (argc, argv, "-update-xrad-average"))) {
     265    remove_argument (N, &argc, argv);
     266    UPDATE_XRAD = TRUE;
    261267  }
    262268
  • branches/eam_branches/ipp-20211108/Ohana/src/relphot/src/reload_catalogs.c

    r41671 r42073  
    5555
    5656    catalog.catflags    = DVO_LOAD_AVERAGE | DVO_LOAD_MEASURE | DVO_LOAD_MISSING | DVO_LOAD_SECFILT;
     57    // if we want to update the average XRAD values in lensobj, need to load lensobj and lensing
     58    if (UPDATE_XRAD || UPDATE_CATFORMAT) {
     59      catalog.catflags |= DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ;
     60    }
    5761    // if we are going to update the format, we should update all tables
    5862    if (UPDATE_CATFORMAT) {
    59       catalog.catflags |= DVO_LOAD_LENSING | DVO_LOAD_LENSOBJ | DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
     63      catalog.catflags |= DVO_LOAD_STARPAR | DVO_LOAD_GALPHOT;
    6064    }
    6165    catalog.Nsecfilt    = GetPhotcodeNsecfilt ();               // set the desired number in case we need to create the catalog
     
    8791    setMrelFinal (&catalog, FALSE);
    8892    TIMESTAMP(time6);
     93
     94    if (UPDATE_XRAD) {
     95      setXradAverages (&catalog);
     96    }
    8997
    9098    // modify the output format as desired (ignore current format on disk)
  • branches/eam_branches/ipp-20211108/Ohana/src/relphot/src/relphot_images.c

    r41664 r42073  
    133133    // if (GRID_ZEROPT) dump_grid ();
    134134
     135    setMcal  (catalog);
     136    setMmos  (catalog);
     137    setMgrp  (catalog);
    135138    MARKTIME("-- finalize Mcal values: %f sec\n", dtime);
    136139
Note: See TracChangeset for help on using the changeset viewer.