Changeset 36085 for trunk/psModules/src/objects/pmFootprintCullPeaks.c
- Timestamp:
- Aug 31, 2013, 5:55:16 AM (13 years ago)
- Location:
- trunk/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/objects/pmFootprintCullPeaks.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20130711/psModules (added) merged: 35843,35876,35947-35948,35961-35963,35966-35967,36021,36024,36027,36066-36069,36075
- Property svn:mergeinfo changed
-
trunk/psModules/src/objects/pmFootprintCullPeaks.c
r34800 r36085 25 25 bool dumpfootprints (pmFootprint *fp, pmFootprintSpans *fpSp); 26 26 27 /*28 * Examine the peaks in a pmFootprint, and throw away the ones that are not sufficiently29 * isolated. More precisely, for each peak find the highest coll that you'd have to traverse30 * to reach a still higher peak --- and if that coll's more (less?) than nsigma DN below your31 * starting point, discard the peak.32 */27 /* 28 * Examine the peaks in a pmFootprint, and throw away the ones that are not sufficiently 29 * isolated. More precisely, for each peak find the highest coll that you'd have to traverse 30 * to reach a still higher peak --- and if that coll's more (less?) than nsigma DN below your 31 * starting point, discard the peak. 32 */ 33 33 34 34 # define IN_PEAK 1 … … 48 48 49 49 if (fp->peaks == NULL || fp->peaks->n < 2) { // nothing to do 50 return PS_ERR_NONE;50 return PS_ERR_NONE; 51 51 } 52 52 … … 91 91 92 92 // max flux is above threshold for brightest peak 93 pmPeak *maxPeak = NULL;94 for (int i = 0; i < fp->peaks->n; i++) {95 pmPeak *testPeak = fp->peaks->data[i];96 float this_peak = useSmoothedImage ? testPeak->smoothFlux : testPeak->rawFlux;93 pmPeak *maxPeak = NULL; 94 for (int i = 0; i < fp->peaks->n; i++) { 95 pmPeak *testPeak = fp->peaks->data[i]; 96 float this_peak = useSmoothedImage ? testPeak->smoothFlux : testPeak->rawFlux; 97 97 98 if (isfinite(this_peak)) {99 maxPeak = fp->peaks->data[i];100 break;101 }102 }103 psAssert(maxPeak,"maxPeak was not set in these peaks");104 // = fp->peaks->data[0];98 if (isfinite(this_peak)) { 99 maxPeak = fp->peaks->data[i]; 100 break; 101 } 102 } 103 psAssert(maxPeak,"maxPeak was not set in these peaks"); 104 // = fp->peaks->data[0]; 105 105 float maxFlux = useSmoothedImage ? maxPeak->smoothFlux : maxPeak->rawFlux; 106 106 … … 130 130 } 131 131 #if (0) 132 if (threshbounds->data.F32[threshbounds->n-1] > maxFlux) {133 psWarning ("upper limit: %f does not include max flux: %f",134 threshbounds->data.F32[threshbounds->n-1], maxFlux);135 }132 if (threshbounds->data.F32[threshbounds->n-1] > maxFlux) { 133 psWarning ("upper limit: %f does not include max flux: %f", 134 threshbounds->data.F32[threshbounds->n-1], maxFlux); 135 } 136 136 #endif 137 137 psHistogram *threshist = psHistogramAllocGeneric(threshbounds);
Note:
See TracChangeset
for help on using the changeset viewer.
