IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34769


Ignore:
Timestamp:
Dec 5, 2012, 3:52:34 PM (14 years ago)
Author:
watersc1
Message:

Implementation of Peter's moments ratio extendedness check. Off by default, but enabled along with other extended threshold changes in the DIFF psphot recipe.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippconfig/gpc1/psphot.config

    r34307 r34769  
    4949  DIFF_STATS                        BOOL TRUE          # Calculate diff-specific stats
    5050  OUTPUT.FORMAT                     STR  PS1_DV2       # Format of output file
     51
     52  PSPHOT.EXT.NSIGMA.LIMIT           F32  0.0
     53  PSPHOT.EXT.DIFF.ALTERNATE         BOOL TRUE
     54  PSPHOT.EXT.DIFF.ALTERNATE.THRESH  F32  1.25
     55END
     56
     57SSTF_DIFF METADATA
     58  PSPHOT.EXT.NSIGMA.LIMIT           F32  0.0
     59  PSPHOT.EXT.DIFF.ALTERNATE         BOOL TRUE
     60  PSPHOT.EXT.DIFF.ALTERNATE.THRESH  F32  1.25
    5161END
    5262
  • trunk/ippconfig/recipes/psphot.config

    r34657 r34769  
    345345PSPHOT.EXT.NSIGMA.LIMIT             F32   3.0  # sources with extNsigma greater that this get tagged as likely extended sources
    346346PSPHOT.EXT.NSIGMA.MOMENTS           F32   3.0  # sources with extNsigma greater that this get tagged as likely extended sources
     347PSPHOT.EXT.DIFF.ALTERNATE           BOOL  FALSE           # use alternate extended source calculation; designed for diff trails
     348PSPHOT.EXT.DIFF.ALTERNATE.THRESH    F32   1.5             # threshold for alternate extended source calculations
    347349PSPHOT.CR.GROW                      S32   1               # Number of pixels to grow CR mask
    348350PSPHOT.CR.NSIGMA.SOFTEN             F32   0.0025          # Softening parameter for weights
  • trunk/psphot/src/psphotSourceSize.c

    r34418 r34769  
    1111    float nSigmaMoments;
    1212    float nSigmaCR;
     13    bool altDiffExt;
     14    float altDiffExtThresh;
    1315    float soft;
    1416    int grow;
     
    120122    assert (status);
    121123
     124    // Optional extended source measurement algorithm to improve diff image trails
     125    options.altDiffExt = psMetadataLookupBool(&status, recipe, "PSPHOT.EXT.DIFF.ALTERNATE");
     126    assert (status);
     127    // Threshold for this alternate method
     128    options.altDiffExtThresh = psMetadataLookupF32(&status, recipe, "PSPHOT.EXT.DIFF.ALTERNATE.THRESH");
     129    assert (status);
     130   
    122131    // location of a single test source
    123132    options.xtest = psMetadataLookupS32 (&status, recipe, "PSPHOT.CRMASK.XTEST");
     
    601610            continue;
    602611        }
    603 
     612        // Alternate extended source limit calculation
     613        if (options->altDiffExt) {
     614          // ratio of major to minor axes
     615          // MRV = Major / Minor
     616          // MRV = (0.5 * (Mxx + Myy) + 0.5 * sqrt( (Mxx + Myy)^2 + 4 Mxy^2)) /
     617          //       (0.5 * (Mxx + Myy) - 0.5 * sqrt( (Mxx + Myy)^2 + 4 Mxy^2))
     618          // MRV = (2 * 0.5 * (Mxx + Myy) - Minor) / Minor
     619          float momentRatioVeres = (Mxx + Myy - Mminor) / Mminor;
     620          bool  isAltEXT = (momentRatioVeres > options->altDiffExtThresh);
     621          if (isAltEXT) {
     622            psTrace("psphotSourceClassRegion.EXT",4,"CLASS: %g %g\t%g %g\t%g %g\t%g %g\t%g ALTEXT\t%g %g\n",
     623                    source->peak->xf, source->peak->yf, Mminor, kMag, dMag, nSigmaMAG, options->sizeLimitCR, options->magLimitCR, options->nSigmaApResid,
     624                    momentRatioVeres,options->altDiffExtThresh);
     625            source->mode |= PM_SOURCE_MODE_EXT_LIMIT;
     626            source->tmpFlags |= PM_SOURCE_TMPF_SIZE_MEASURED;
     627            Next ++;
     628            continue;
     629          }
     630        }
     631       
    604632        // Everything else should just be treated as a PSF
    605633        psTrace("psphotSourceClassRegion.PSF",4,"CLASS: %g %g\t%g %g\t%g %g\t%g %g\t%g PSF\n",
Note: See TracChangeset for help on using the changeset viewer.