Changeset 17870 for trunk/psphot/src/psphotFindDetections.c
- Timestamp:
- May 30, 2008, 4:09:46 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotFindDetections.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotFindDetections.c
r17444 r17870 6 6 bool status; 7 7 int pass; 8 float NSIGMA_PEAK = 25.0; 9 int NMAX = 0; 8 10 9 11 psTimerStart ("psphot"); … … 20 22 detections = pmDetectionsAlloc(); 21 23 pass = 1; 24 NSIGMA_PEAK = psMetadataLookupF32 (&status, recipe, "PEAKS_NSIGMA_LIMIT"); PS_ASSERT (status, NULL); 25 NMAX = psMetadataLookupS32 (&status, recipe, "PEAKS_NMAX"); PS_ASSERT (status, NULL); 22 26 } else { 23 27 pass = 2; 28 NSIGMA_PEAK = psMetadataLookupF32 (&status, recipe, "PEAKS_NSIGMA_LIMIT_2"); PS_ASSERT (status, NULL); 29 NMAX = 0; // unlimited number of peaks in final pass: allow a limit (PEAKS_NMAX_2) ? 24 30 } 31 32 float threshold = PS_SQR(NSIGMA_PEAK); 25 33 26 34 // move the old peaks array (if it exists) to oldPeaks … … 34 42 35 43 // detect the peaks in the significance image 36 detections->peaks = psphotFindPeaks (significance, readout, recipe, pass, maskVal); 44 detections->peaks = psphotFindPeaks (significance, readout, recipe, threshold, NMAX); 45 psMetadataAddF32 (recipe, PS_LIST_TAIL, "PEAK_THRESHOLD", PS_META_REPLACE, "Peak Detection Threshold", threshold); 37 46 38 47 // optionally merge peaks into footprints … … 47 56 // if we use the footprints, the output peaks list contains both old and new peaks, 48 57 // otherwise it only contains the new peaks. 49 50 // if psf is defined, we should treat this as pass "2", not "1". re-define this boolean to51 // be "have PSF"
Note:
See TracChangeset
for help on using the changeset viewer.
