IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35931


Ignore:
Timestamp:
Aug 12, 2013, 6:23:17 PM (13 years ago)
Author:
watersc1
Message:

Add PSF.TARGET.AS.MAX/PSF.TARGET.AS.MAX.EPSILON options to set the target based on the largest input FWHM.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20130702/ippconfig/gpc1/ppStack.config

    r35580 r35931  
    6363    PSF.INPUT.THRESH        F32   10.0
    6464    PSF.INPUT.ASYMMETRY     F32   0.2
     65    PSF.TARGET.AS.MAX       BOOL  TRUE
    6566   MATCH.REJ        F32    4.0
    6667   SAFE          BOOL   F
  • branches/czw_branch/20130702/ippconfig/recipes/ppStack.config

    r35580 r35931  
    9595PSF.INPUT.THRESH        F32  NAN        # Set minimum limit below which we do not exclude an input (defaults to 0.0)
    9696PSF.INPUT.ASYMMETRY     F32  NAN        # Set difference in mixture model populations to consider equal.
     97PSF.TARGET.AS.MAX       BOOL F          # Set the target PSF FWHM as the maximum of accepted input FWHM values.
     98PSF.TARGET.AS.MAX.EPSILON F32 0.1       # Amount to set the target PSF FWHM larger than the maximum input. Target = eps + max(input)
    9799
    98100TEMP.IMAGE      STR     conv.im.fits    # Suffix for temporary convolved images
  • trunk/ppStack/src/ppStackPrepare.c

    r35530 r35931  
    257257
    258258    bool mdok = false;
    259     bool  simpleClip = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.CLIP.SIMPLE");
     259    bool  simpleClip = psMetadataLookupBool(&mdok, recipe, "PSF.INPUT.CLIP.SIMPLE");
    260260    float maxFWHM = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.MAX"); // max allowed input fwhm
    261261    float clipFWHMnSig = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.CLIP.NSIGMA"); // sigma clipping of inputs
    262262    float threshFWHM = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.THRESH"); // FWHM size that we refuse to clip below
    263263    float asymmetryFWHM = psMetadataLookupF32(&mdok, recipe, "PSF.INPUT.ASYMMETRY"); // max bimodal asymmetry
     264
    264265   
    265266    psString log = psStringCopy("Input seeing FWHMs:\n"); // Log message
     
    477478                         "Target PSF for stack", options->psf);
    478479        options->targetSeeing = pmPSFtoFWHM(options->psf, 0.5 * numCols, 0.5 * numRows); // FWHM for target
    479         psLogMsg("ppStack", PS_LOG_INFO, "Target seeing FWHM: %f\n", options->targetSeeing);
    480 
     480
     481
     482        bool psfTargetAsMax = psMetadataLookupBool(&mdok, recipe, "PSF.TARGET.AS.MAX");
     483        if (psfTargetAsMax) { // Should we use the largest input as the target?
     484          float psfTargetEpsilon = psMetadataLookupF32(&mdok,recipe,"PSF.TARGET.AS.MAX.EPSILON");
     485          if (!mdok) { psfTargetEpsilon = 0.0; }
     486          options->targetSeeing = 0.0;
     487          for (int i = 0; i < num; i++) {
     488            if (options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) continue;
     489            options->targetSeeing = PS_MAX(options->targetSeeing,options->inputSeeing->data.F32[i]);
     490          }
     491          psLogMsg("ppStack", PS_LOG_INFO, "Using MAX accepted input FWHM as target (max: %f epsilon: %f target %f)\n",
     492                   options->targetSeeing,psfTargetEpsilon,options->targetSeeing + psfTargetEpsilon);
     493          options->targetSeeing = options->targetSeeing + psfTargetEpsilon;
     494        }
     495        psLogMsg("ppStack", PS_LOG_INFO, "Target seeing FWHM: %f\n", options->targetSeeing);   
     496       
    481497        pmChip *outChip = pmFPAfileThisChip(config->files, view, "PPSTACK.TARGET.PSF"); // Output chip
    482498        psMetadataAddPtr(outChip->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN,
Note: See TracChangeset for help on using the changeset viewer.