IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38639


Ignore:
Timestamp:
Jul 26, 2015, 3:22:32 PM (11 years ago)
Author:
eugene
Message:

add option to skip stack or warp average photometry

Location:
branches/eam_branches/ipp-20150625/Ohana/src/relphot
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/relphot/include/relphot.h

    r38466 r38639  
    1414// # define IDX_T off_t
    1515# define IDX_T int
     16
     17typedef enum {
     18  STAGE_CHIP  = 0x01,
     19  STAGE_WARP  = 0x02,
     20  STAGE_STACK = 0x04,
     21} RelphotStages;
    1622
    1723typedef enum {
     
    327333int USE_BASIC_CHECK;
    328334int USE_FULL_OVERLAP;
     335
     336RelphotStages STAGES;
    329337
    330338# ifdef GRID_V1
  • branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/args.c

    r38466 r38639  
    344344  }
    345345
     346  STAGES = STAGE_CHIP | STAGE_WARP | STAGE_STACK;
     347  if ((N = get_argument (argc, argv, "-skip-chip"))) {
     348    remove_argument (N, &argc, argv);
     349    STAGES &= ~STAGE_CHIP;
     350  }
     351  if ((N = get_argument (argc, argv, "-skip-warp"))) {
     352    remove_argument (N, &argc, argv);
     353    STAGES &= ~STAGE_WARP;
     354  }
     355  if ((N = get_argument (argc, argv, "-skip-stack"))) {
     356    remove_argument (N, &argc, argv);
     357    STAGES &= ~STAGE_STACK;
     358  }
     359  if (!STAGES) {
     360    fprintf (stderr, "ERROR: no valid stages selected\n");
     361    exit (3);
     362  }
     363
    346364  REGION_FILE = NULL;
    347365  if ((N = get_argument (argc, argv, "-region-hosts"))) {
     
    664682  }
    665683
     684  STAGES = STAGE_CHIP | STAGE_WARP | STAGE_STACK;
     685  if ((N = get_argument (argc, argv, "-skip-chip"))) {
     686    remove_argument (N, &argc, argv);
     687    STAGES &= ~STAGE_CHIP;
     688  }
     689  if ((N = get_argument (argc, argv, "-skip-warp"))) {
     690    remove_argument (N, &argc, argv);
     691    STAGES &= ~STAGE_WARP;
     692  }
     693  if ((N = get_argument (argc, argv, "-skip-stack"))) {
     694    remove_argument (N, &argc, argv);
     695    STAGES &= ~STAGE_STACK;
     696  }
     697  if (!STAGES) {
     698    fprintf (stderr, "ERROR: no valid stages selected\n");
     699    exit (3);
     700  }
     701
    666702  if ((MODE == MODE_SYNTH_PHOT)  && (argc == 1)) return TRUE;
    667703  if ((MODE == MODE_UPDATE_OBJECTS)  && (argc == 1)) return TRUE;
  • branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/reload_catalogs.c

    r38621 r38639  
    246246    if (SYNTH_ZERO_POINTS) { strextend (&command, "-synthphot-zpts %s", SYNTH_ZERO_POINTS); }
    247247
     248    if (!(STAGES & STAGE_CHIP))  { strextend (&command, "-skip-chip"); }
     249    if (!(STAGES & STAGE_WARP))  { strextend (&command, "-skip-warp"); }
     250    if (!(STAGES & STAGE_STACK)) { strextend (&command, "-skip-stack"); }
     251
    248252    // deprecate
    249253    // if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", SET_MREL_VERSION); } // XXXX deprecate this...
  • branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/relphot_objects.c

    r38621 r38639  
    157157    if (SYNTH_ZERO_POINTS) { strextend (&command, "-synthphot-zpts %s", SYNTH_ZERO_POINTS); }
    158158
     159    if (!(STAGES & STAGE_CHIP))  { strextend (&command, "-skip-chip"); }
     160    if (!(STAGES & STAGE_WARP))  { strextend (&command, "-skip-warp"); }
     161    if (!(STAGES & STAGE_STACK)) { strextend (&command, "-skip-stack"); }
     162
    159163    // if (SET_MREL_VERSION != 1) { strextend (&command, "-set-mrel-version %d", SET_MREL_VERSION); }
    160164
  • branches/eam_branches/ipp-20150625/Ohana/src/relphot/src/setMrelCatalog.c

    r38473 r38639  
    4949  for (j = 0; j < catalog[Nc].Naverage; j++) {
    5050
    51     setMrelAverageExposure (&catalog[Nc], Nc, j, Nsecfilt, isSetMrelFinal, flatcorr, results);
     51    if (STAGES & STAGE_CHIP) {
     52      setMrelAverageExposure (&catalog[Nc], Nc, j, Nsecfilt, isSetMrelFinal, flatcorr, results);
     53    }
    5254
    5355    // only apply Stack operation on setMrelFinal in first pass
    54     if (isSetMrelFinal && !IS_DIFF_DB) {
     56    if (isSetMrelFinal && (STAGES & STAGE_STACK) && !IS_DIFF_DB) {
    5557      setMrelAverageStack (&catalog[Nc], Nc, j, Nsecfilt, flatcorr);
    5658    }
    5759
    5860    // only measure force-warp mean values if issetMrelFinal (make it optional?)
    59     if (isSetMrelFinal) {
     61    if (isSetMrelFinal && (STAGES & STAGE_WARP)) {
    6062      setMrelAverageForcedWarp (&catalog[Nc], Nc, j, Nsecfilt, flatcorr, results);
    6163    }
Note: See TracChangeset for help on using the changeset viewer.