IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36351


Ignore:
Timestamp:
Dec 4, 2013, 3:41:02 PM (13 years ago)
Author:
eugene
Message:

(re)add doAnnuli / EXTENDED_SOURCE_ANNULI to request radial annuli in the output

Location:
branches/eam_branches/ipp-20130904
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/ippconfig/recipes/psphot.config

    r36350 r36351  
    190190# extended source aperture-like measurements
    191191EXTENDED_SOURCE_PETROSIAN           BOOL  FALSE
     192EXTENDED_SOURCE_ANNULI              BOOL  FALSE
    192193EXTENDED_SOURCE_RAW_RADIUS          BOOL  FALSE  # use circular (T) or elliptical (F) contours for petrosians?
    193194EXTENDED_SOURCE_SN_LIM              F32   20.0
     
    438439  EXTENDED_SOURCE_SN_LIM              F32   10.0
    439440  EXTENDED_SOURCE_PETROSIAN           BOOL  TRUE
     441  EXTENDED_SOURCE_ANNULI              BOOL  TRUE
    440442
    441443  PSPHOT.STACK.MATCH.PSF.SOURCE       STR   AUTO # which inputs to convolve? (RAW, CNV, AUTO)
  • branches/eam_branches/ipp-20130904/psModules/src/objects/pmSourceIO.c

    r36299 r36351  
    479479
    480480        // if this is not TRUE, the output files only contain the psf measurements.
    481         bool XSRC_OUTPUT = psMetadataLookupBool(&status, recipe, "EXTENDED_SOURCE_ANALYSIS");
     481        bool doPetrosian = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_PETROSIAN");
     482        bool doAnnuli    = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_ANNULI");
     483        bool XSRC_OUTPUT = doPetrosian || doAnnuli;
    482484        bool XFIT_OUTPUT = psMetadataLookupBool(&status, recipe, "EXTENDED_SOURCE_FITS");
    483485        bool XRAD_OUTPUT = psMetadataLookupBool(&status, recipe, "RADIAL_APERTURES");
  • branches/eam_branches/ipp-20130904/psphot/src/psphotExtendedSourceAnalysis.c

    r36342 r36351  
    1616    psAssert (recipe, "missing recipe?");
    1717
     18    bool doPetrosian = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_PETROSIAN");
     19    bool doAnnuli    = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_ANNULI");
     20
    1821    // measure petrosians?
    19     if (!psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_PETROSIAN")) {
     22    if (!doPetrosian && !doAnnuli) {
    2023        psLogMsg ("psphot", PS_LOG_INFO, "skipping extended source measurements\n");
    2124        return true;
     
    208211    float skynoise          = PS_SCALAR_VALUE(job->args->data[4],F32);
    209212
     213    bool doPetrosian    = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_PETROSIAN");
     214
    210215    // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
    211216    psImageMaskType maskVal = psMetadataLookupImageMask(&status, recipe, "MASK.PSPHOT"); // Mask value for bad pixels
     
    254259
    255260        // Petrosian Mags
    256         if (!psphotPetrosian (source, recipe, skynoise, maskVal)) {
    257           psTrace ("psphot", 5, "FAILED petrosian flux & radius for source at %7.1f, %7.1f", source->moments->Mx, source->moments->My);
    258         } else {
    259           psTrace ("psphot", 5, "measured petrosian flux & radius for source at %7.1f, %7.1f", source->moments->Mx, source->moments->My);
    260           Npetro ++;
    261           source->mode |= PM_SOURCE_MODE_EXTENDED_STATS;
     261        if (doPetrosian) {
     262          if (!psphotPetrosian (source, recipe, skynoise, maskVal)) {
     263            psTrace ("psphot", 5, "FAILED petrosian flux & radius for source at %7.1f, %7.1f", source->moments->Mx, source->moments->My);
     264          } else {
     265            psTrace ("psphot", 5, "measured petrosian flux & radius for source at %7.1f, %7.1f", source->moments->Mx, source->moments->My);
     266            Npetro ++;
     267            source->mode |= PM_SOURCE_MODE_EXTENDED_STATS;
     268          }
    262269        }
    263270
Note: See TracChangeset for help on using the changeset viewer.