IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41624


Ignore:
Timestamp:
May 28, 2021, 10:15:35 AM (5 years ago)
Author:
eugene
Message:

more cleanup: add REQUIRE_PSFFIT option, rename setMrel_catalog_alt to setMrelCatalog, add notes on resets, move setMflatFromGrid into setMrelFinal

Location:
branches/eam_branches/relphot.20210521
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/relphot.20210521/include/relphot.h

    r41620 r41624  
    445445int    REPAIR_WARPS;
    446446int    PRESERVE_PS1;
     447int    REQUIRE_PSFFIT;
    447448int    UPDATE;
    448449int    SAVE_IMAGE_UPDATES;
     
    735736
    736737int print_measure_set_alt (Average *average, SecFilt *secfilt, Measure *measure);
    737 int setMrel_catalog_alt (Catalog *catalog, int Nc, int isSetMrelFinal, SetMrelInfo *results, int Nsecfilt);
     738
     739// in setMrelCatalog.c:
     740int setMrelCatalog (Catalog *catalog, int Nc, int isSetMrelFinal, SetMrelInfo *results, int Nsecfilt);
    738741int setMrelAverageExposure (Catalog *catalog, int cat, off_t ave, int Nsecfilt, int isSetMrelFinal, SetMrelInfo *results);
    739742int setMrelAverageStack (Catalog *catalog, int cat, off_t ave, int Nsecfilt);
  • branches/eam_branches/relphot.20210521/src/ResetOps.c

    r41623 r41624  
    3939   
    4040
    41 // Used in bcatalog.c
     41// Used in bcatalog.c, applied to the subset catalogs (bright, good stars used for calibration)
    4242void ResetAverageActivePhotcodes (SecFilt *secfilt) {
    4343
     
    5656}
    5757
    58 // Used in bcatalog.c
     58// Used in bcatalog.c, applied to the selected measurements which are already selected by photcode
    5959void ResetMeasureZeroPoints (MeasureTiny *measure, off_t Nmeasure, off_t Ncat) {
    6060
     
    7878}
    7979
    80 // Used in load_images.c:
    81 // XXX NOTE : This resets all images regardless of active photcode
     80// Used in load_images.c.  Applied to the subset of selected images used for the calibration.
     81// This will be only those images in the selected region and only those with the active
     82// photcode *unless* -use-all-images is selected. 
    8283void ResetImages (Image *subset, off_t Nsubset) {
    8384
  • branches/eam_branches/relphot.20210521/src/StarOps.c

    r41607 r41624  
    1414void *setMrel_worker (void *data);
    1515int setMrel_threaded (Catalog *catalog, int Ncatalog);
    16 int setMrel_catalog (Catalog *catalog, int Nc, int pass, SetMrelInfo *results, int Nsecfilt);
    1716int print_measure_set (Average *average, SecFilt *secfilt, Measure *measure);
    1817
     
    315314
    316315  for (i = 0; i < Ncatalog; i++) {
    317     setMrel_catalog_alt (catalog, i, FALSE, &results, Nsecfilt);
     316    setMrelCatalog (catalog, i, FALSE, &results, Nsecfilt);
    318317    SetMrelInfoAccum (&summary, &results);
    319318  }
     
    338337
    339338  for (i = 0; i < Ncatalog; i++) {
    340     setMrel_catalog_alt (catalog, i, TRUE, &results, Nsecfilt);
     339    setMrelCatalog (catalog, i, TRUE, &results, Nsecfilt);
    341340    SetMrelInfoAccum (&summary, &results);
    342341  }
     
    436435    Catalog *catalog = threadinfo->catalog;
    437436
    438     setMrel_catalog_alt (catalog, i, FALSE, &results, Nsecfilt);
     437    setMrelCatalog (catalog, i, FALSE, &results, Nsecfilt);
    439438    SetMrelInfoAccum (&threadinfo->summary, &results);
    440439  }
  • branches/eam_branches/relphot.20210521/src/args.c

    r41623 r41624  
    241241    remove_argument (N, &argc, argv);
    242242    PRESERVE_PS1 = TRUE;
     243  }
     244  REQUIRE_PSFFIT = FALSE;
     245  if ((N = get_argument (argc, argv, "-require-psffit"))) {
     246    remove_argument (N, &argc, argv);
     247    REQUIRE_PSFFIT = TRUE;
    243248  }
    244249
  • branches/eam_branches/relphot.20210521/src/bcatalog.c

    r41620 r41624  
    8989
    9090      // require 0x01 in photFlags (fitted with a PSF) -- add to the test data
    91 // XXX EAM : test is inconsistent -- fix      if ((catalog[0].measure[offset].photFlags & 0x01) == 0) { Nbad ++; continue; }
     91      if (REQUIRE_PSFFIT && (catalog[0].measure[offset].photFlags & 0x01) == 0) { Nbad ++; continue; }
    9292
    9393      // very loose cut on PSF - Kron
  • branches/eam_branches/relphot.20210521/src/reload_catalogs.c

    r41623 r41624  
    8585    initMrel (&catalog, 1);
    8686
    87     setMflatFromGrid (&catalog); // Mgrid is used to set Mflat; Mgrid is the ignored in setMrelFinal/setMrelCatalog.c
    8887    setMrelFinal (&catalog, FALSE);
    8988    TIMESTAMP(time6);
  • branches/eam_branches/relphot.20210521/src/relphot_images.c

    r41623 r41624  
    9696      SetZptIteration (i);
    9797
    98       setMrel  (catalog, Ncatalog); // threaded (calls setMrel_catalog_alt in setMrelCatalog.c)
     98      setMrel  (catalog, Ncatalog); // threaded (calls setMrelCatalog)
    9999
    100100      setMcal  (catalog);
     
    177177     clients */
    178178  if (!CALIBRATE_STACKS_AND_WARPS) {
    179     reload_catalogs (skylist, 0, NULL); // calls setMrelFinal which setMrelOutput which calls setMrel_catalog_alt
     179    reload_catalogs (skylist, 0, NULL); // calls setMrelFinal which setMrelOutput which calls setMrelCatalog
    180180    MARKTIME("-- updated all catalogs: %f sec\n", dtime);
    181181  }
  • branches/eam_branches/relphot.20210521/src/select_images.c

    r41620 r41624  
    103103    if (!(i % 300000)) fprintf (stderr, ".");
    104104
    105     /* exclude images by photcode (we are not doing this, but I'm not sure why) */
     105    // only include active photcodes in the analysis
    106106    if (timage[i].photcode) {
    107107      int Ns = GetActivePhotcodeIndex (timage[i].photcode);
  • branches/eam_branches/relphot.20210521/src/setMrelCatalog.c

    r41620 r41624  
    6060int useOLS = TRUE; // chosen based on iteration below
    6161
    62 int setMrel_catalog_alt (Catalog *catalog, int Nc, int isSetMrelFinal, SetMrelInfo *results, int Nsecfilt) {
     62int setMrelCatalog (Catalog *catalog, int Nc, int isSetMrelFinal, SetMrelInfo *results, int Nsecfilt) {
    6363
    6464  off_t j;
  • branches/eam_branches/relphot.20210521/src/setMrelFinal.c

    r41623 r41624  
    2727  ALLOCATE (catalog[0].measureRank, char, catalog[0].Nmeasure);
    2828  setMeasureRank (catalog);
     29
     30  setMflatFromGrid (catalog); // Mgrid is used to set Mflat; Mgrid is the ignored in setMrelOutput / setMrelCatalog
    2931  setMrelOutput (catalog, 1); // sets the values secfilt.MpsfChp = <measure.M - image.Mcal - measure.Mflat>
    3032  setMcalOutput (catalog, 1); // sets measure.Mcal = image.Mcal
    3133
    32   /* clear ID_OBJ_POOR, ID_OBJ_FEW values before writing ??? */
    33   /* ID_MEAS_NOCAL is an internal bit, so it should be cleared */
     34  // clear ID_OBJ_POOR, ID_OBJ_FEW, ID_MEAS_NOCAL values before writing
     35  // These are internal bits, so they should be cleared
     36  // XXX are these still used?
    3437  // XXX eventually: move these internal flags to an internal-only catalog->FOO element (like found)
    3538  for (i = 0; i < catalog[0].Naverage; i++) {
     
    8386int print_measure_set (Average *average, SecFilt *secfilt, Measure *measure);
    8487
     88// XXX this function is no longer used:
    8589void skip_measurements (Catalog *catalog, int pass) {
    8690
Note: See TracChangeset for help on using the changeset viewer.