- Timestamp:
- Dec 6, 2012, 6:32:19 PM (14 years ago)
- Location:
- branches/czw_branch/20120906/psphot
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20120906/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20120905/psphot (added) merged: 34408-34409,34415-34416,34428,34466,34565,34570,34575,34735,34747
- Property svn:mergeinfo changed
-
branches/czw_branch/20120906/psphot/src
- Property svn:mergeinfo changed
-
branches/czw_branch/20120906/psphot/src/psphotFindDetections.c
r34404 r34772 46 46 psAssert (maskVal, "missing mask value?"); 47 47 48 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) 49 psImageMaskType markVal = psMetadataLookupImageMask(&status, recipe, "MARK.PSPHOT"); // Mask value for bad pixels 50 psAssert (markVal, "missing mark value?"); 51 52 maskVal |= markVal; 53 48 54 // Use the new pmFootprints approach? 49 55 const bool useFootprints = psMetadataLookupBool(NULL, recipe, "USE_FOOTPRINTS"); … … 64 70 psMemIncrRefCounter(detections); // so we can free the detections below 65 71 } 72 73 // first pass vs other: if this is the first pass, the code will use PEAKS_NSIGMA_LIMIT and 74 // only attempt to detect PEAKS_NMAX entries. If 'firstPass' is false, the code will 75 // attempt to replace the subtracted sources in order to measure the footprints. After 76 // replacement, it is necessary to regenerate the significance image. If no sources are 77 // available, the code will skip the significance image regeneration step. 66 78 67 79 bool replaceSourcesForFootprints = false; … … 120 132 if (useFootprints) { 121 133 if (replaceSourcesForFootprints) { 134 bool modified = false; 122 135 // subtract the noise for all sources including satstars 123 psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false);124 psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false);136 modified |= psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false); 137 modified |= psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false); 125 138 126 139 // add in the satstars 127 psphotAddOrSubSatstarsReadout (config, view, filerule, index, recipe, true);140 modified |= psphotAddOrSubSatstarsReadout (config, view, filerule, index, recipe, true); 128 141 129 psFree (significance); 130 significance = psphotSignificanceImage (readout, recipe, maskVal); 142 if (modified) { 143 psFree (significance); 144 significance = psphotSignificanceImage (readout, recipe, maskVal); 145 } 131 146 132 147 // display the significance image
Note:
See TracChangeset
for help on using the changeset viewer.
