- Timestamp:
- Mar 18, 2011, 2:10:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110213/psphot/src/psphotCullPeaks.c
r30932 r30975 1 1 # include "psphotInternal.h" 2 3 # define CULL_WITH_SMOOTHED_IMAGE 14 2 5 3 /* … … 63 61 float SAT_THRESHOLD = 0.05*SATURATION; 64 62 65 # if ( CULL_WITH_SMOOTHED_IMAGE)63 # if (PM_PEAKS_CULL_WITH_SMOOTHED_IMAGE) 66 64 psLogMsg ("psphot", PS_LOG_INFO, "Culling peaks from footprints using the smoothed image"); 67 65 # else … … 81 79 pmPeak *brightPeak = fp->peaks->data[0]; 82 80 float max_threshold = SAT_TEST_LEVEL; 83 if (brightPeak-> flux > SAT_TEST_LEVEL) {81 if (brightPeak->rawFlux > SAT_TEST_LEVEL) { 84 82 max_threshold = SAT_THRESHOLD; 85 83 brightPeak->type = PM_PEAK_SUSPECT_SATURATION; 86 84 } 87 85 88 # if ( CULL_WITH_SMOOTHED_IMAGE)86 # if (PM_PEAKS_CULL_WITH_SMOOTHED_IMAGE) 89 87 // New (post r30869) style of culling using the smoothed image and variance (S/N) 90 88 // if we cull using the significance image, then the definition of variance is different (thus the bool in arg 8) 91 if (pmFootprintCullPeaks(signifR->image, signifR->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, false) != PS_ERR_NONE) {89 if (pmFootprintCullPeaks(signifR->image, signifR->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, true) != PS_ERR_NONE) { 92 90 return psError(PS_ERR_UNKNOWN, false, "Culling pmFootprint %d", fp->id); 93 91 } 94 92 # else 95 93 // Old (pre r30869) style of culling using the raw image and variance 96 if (pmFootprintCullPeaks(readout->image, readout->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, true) != PS_ERR_NONE) {94 if (pmFootprintCullPeaks(readout->image, readout->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, false) != PS_ERR_NONE) { 97 95 return psError(PS_ERR_UNKNOWN, false, "Culling pmFootprint %d", fp->id); 98 }99 # endif100 101 // Alternate style of culling using the smoothed image and raw variance (probably a bad idea)102 # if (0)103 if (pmFootprintCullPeaks(signifR->image, readout->variance, fp, nsigma_delta, fPadding, MIN_THRESHOLD, max_threshold, true) != PS_ERR_NONE) {104 return psError(PS_ERR_UNKNOWN, false, "Culling pmFootprint %d", fp->id);105 96 } 106 97 # endif
Note:
See TracChangeset
for help on using the changeset viewer.
