IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40262


Ignore:
Timestamp:
Dec 8, 2017, 11:02:39 AM (9 years ago)
Author:
eugene
Message:

fix error in stackBestOff; add option to use PSF not APER Mcal for stack APER mags (for testing)

Location:
branches/eam_branches/ohana.20170822/src/relphot
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20170822/src/relphot/include/relphot.h

    r40259 r40262  
    338338int    ApplyOffsets;
    339339int    SyntheticPhotometry;
     340
     341int    USE_MCAL_PSF_FOR_STACK_APER;
    340342
    341343char  *PhotcodeList;
  • branches/eam_branches/ohana.20170822/src/relphot/src/StarOps.c

    r40245 r40262  
    496496
    497497        // we need to use McalAPER for stacks (and only stacks)
    498         int isStack = isGPC1stack(catalog[i].measureT[m].photcode);
     498        int useStackAper = !USE_MCAL_PSF_FOR_STACK_APER && isGPC1stack(catalog[i].measureT[m].photcode);
    499499
    500500        // note that measurements for which the image is not selected will not be modified
     
    503503        // set the output calibration
    504504        catalog[i].measure[m].McalPSF  = McalPSF  + Mmos + Mgrid;
    505         catalog[i].measure[m].McalAPER = isStack ? McalAPER + Mmos + Mgrid : McalPSF  + Mmos + Mgrid;
     505        catalog[i].measure[m].McalAPER = useStackAper ? McalAPER + Mmos + Mgrid : McalPSF  + Mmos + Mgrid;
    506506
    507507        if (catalog[i].measureT[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) {
  • branches/eam_branches/ohana.20170822/src/relphot/src/args.c

    r39926 r40262  
    325325    remove_argument (N, &argc, argv);
    326326    CALIBRATE_STACKS_AND_WARPS = TRUE;
     327  }
     328  USE_MCAL_PSF_FOR_STACK_APER = FALSE;
     329  if ((N = get_argument (argc, argv, "-use-mcal-psf-for-stack-aper"))) {
     330    remove_argument (N, &argc, argv);
     331    USE_MCAL_PSF_FOR_STACK_APER = TRUE;
    327332  }
    328333
     
    696701  }
    697702
     703  USE_MCAL_PSF_FOR_STACK_APER = FALSE;
     704  if ((N = get_argument (argc, argv, "-use-mcal-psf-for-stack-aper"))) {
     705    remove_argument (N, &argc, argv);
     706    USE_MCAL_PSF_FOR_STACK_APER = TRUE;
     707  }
     708
    698709  /* define time */
    699710  TimeSelect = FALSE;
  • branches/eam_branches/ohana.20170822/src/relphot/src/launch_region_hosts.c

    r40246 r40262  
    7474    if (FREEZE_MOSAICS)             strextend (&command, "-mosfreeze");
    7575    if (CALIBRATE_STACKS_AND_WARPS) strextend (&command, "-only-stacks-and-warps");
     76    if (USE_MCAL_PSF_FOR_STACK_APER) { strextend (&command, "-use-mcal-psf-for-stack-aper"); }
    7677
    7778    if (PARALLEL)                   strextend (&command, "-parallel");
  • branches/eam_branches/ohana.20170822/src/relphot/src/reload_catalogs.c

    r39926 r40262  
    247247    if (SYNTH_ZERO_POINTS) { strextend (&command, "-synthphot-zpts %s", SYNTH_ZERO_POINTS); }
    248248    if (USE_BASIC_CHECK)   {  strextend (&command, "-basic-image-search"); }
     249    if (USE_MCAL_PSF_FOR_STACK_APER) { strextend (&command, "-use-mcal-psf-for-stack-aper"); }
    249250
    250251    if (!(STAGES & STAGE_CHIP))  { strextend (&command, "-skip-chip"); }
  • branches/eam_branches/ohana.20170822/src/relphot/src/relphot_objects.c

    r39926 r40262  
    251251    if (USE_BASIC_CHECK)   { strextend (&command, "-basic-image-search"); }
    252252    if (USE_ALL_IMAGES)    { strextend (&command, "-use-all-images"); }
     253    if (USE_MCAL_PSF_FOR_STACK_APER) { strextend (&command, "-use-mcal-psf-for-stack-aper"); }
    253254
    254255    if (!(STAGES & STAGE_CHIP))  { strextend (&command, "-skip-chip"); }
  • branches/eam_branches/ohana.20170822/src/relphot/src/setMrelCatalog.c

    r40249 r40262  
    705705    } else {
    706706      McalPSF   = getMcal  (meas, cat, MAG_CLASS_PSF);
    707       McalAPER  = getMcal  (meas, cat, MAG_CLASS_KRON);
     707      McalAPER  = USE_MCAL_PSF_FOR_STACK_APER ? getMcal  (meas, cat, MAG_CLASS_PSF) : getMcal  (meas, cat, MAG_CLASS_KRON);
    708708      Mmos      = getMmos  (meas, cat);
    709709      Mgrid     = getMgrid (meas, cat);
     
    768768
    769769    // record the measurement which gave the best value
    770     secfilt[Nsec].stackBestOff = (bestEntryMax > -1) ? -1 : bestEntryMax + measureOffset;
     770    secfilt[Nsec].stackBestOff = (bestEntryMax == -1) ? -1 : bestEntryMax + measureOffset;
    771771    myAssert (secfilt[Nsec].stackBestOff <= catalog[0].Nmeasure, "stackBestOff out of range");
    772772
Note: See TracChangeset for help on using the changeset viewer.