Changeset 34769 for trunk/psphot/src/psphotSourceSize.c
- Timestamp:
- Dec 5, 2012, 3:52:34 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSourceSize.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSourceSize.c
r34418 r34769 11 11 float nSigmaMoments; 12 12 float nSigmaCR; 13 bool altDiffExt; 14 float altDiffExtThresh; 13 15 float soft; 14 16 int grow; … … 120 122 assert (status); 121 123 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 122 131 // location of a single test source 123 132 options.xtest = psMetadataLookupS32 (&status, recipe, "PSPHOT.CRMASK.XTEST"); … … 601 610 continue; 602 611 } 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 604 632 // Everything else should just be treated as a PSF 605 633 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.
