Changeset 13166
- Timestamp:
- May 2, 2007, 3:00:56 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotFindPeaks.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotFindPeaks.c
r13012 r13166 112 112 } 113 113 114 // limit the total number of returned peak as specified 115 if (pass == 1) { 116 psArraySort (peaks, pmPeakSortBySN); 117 int NMAX = psMetadataLookupS32 (&status, recipe, "PEAKS_NMAX"); 118 if (NMAX && (peaks->n > NMAX)) { 119 psArray *tmpPeaks = psArrayAllocEmpty (NMAX); 120 for (int i = 0; i < NMAX; i++) { 121 psArrayAdd (tmpPeaks, 100, peaks->data[i]); 122 } 123 psFree (peaks); 124 peaks = tmpPeaks; 125 } 126 } 127 114 128 // optional dump of all peak data 115 129 char *output = psMetadataLookupStr (&status, recipe, "PEAKS_OUTPUT_FILE"); … … 118 132 } 119 133 psLogMsg ("psphot", PS_LOG_INFO, "%ld peaks: %f sec\n", peaks->n, psTimerMark ("psphot")); 120 // 134 121 135 // If they asked us to return a set of pmFootprints, not a raw pmPeak list, 122 136 // go ahead and find the footprints, and assign them their peaks.
Note:
See TracChangeset
for help on using the changeset viewer.
