Changeset 18241
- Timestamp:
- Jun 20, 2008, 10:09:33 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSourceStats.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSourceStats.c
r17396 r18241 30 30 31 31 psArray *peaks = detections->peaks; 32 if (!peaks) { 33 psError(PS_ERR_UNEXPECTED_NULL, false, "No peaks found!"); 34 return NULL; 35 } 32 36 33 37 sources = psArrayAllocEmpty (peaks->n); … … 37 41 for (int i = 0; i < peaks->n; i++) { 38 42 39 pmPeak *peak = peaks->data[i];40 if (peak->assigned) continue;43 pmPeak *peak = peaks->data[i]; 44 if (peak->assigned) continue; 41 45 42 46 // create a new source, add peak … … 47 51 pmSourceDefinePixels (source, readout, source->peak->x, source->peak->y, OUTER); 48 52 if (!strcasecmp (breakPt, "PEAKS")) { 49 peak->assigned = true;53 peak->assigned = true; 50 54 psArrayAdd (sources, 100, source); 51 55 psFree (source); … … 55 59 // skip faint sources for moments measurement 56 60 if (source->peak->SN < MIN_SN) { 57 peak->assigned = true;61 peak->assigned = true; 58 62 psArrayAdd (sources, 100, source); 59 63 psFree (source); … … 62 66 63 67 // measure a local sky value 64 // the local sky is now ignored; kept here for reference only68 // the local sky is now ignored; kept here for reference only 65 69 status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark); 66 70 if (!status) { … … 85 89 if (status) { 86 90 // add to the source array 87 peak->assigned = true;91 peak->assigned = true; 88 92 psArrayAdd (sources, 100, source); 89 93 psFree (source); … … 99 103 if (status) { 100 104 // add to the source array 101 peak->assigned = true;105 peak->assigned = true; 102 106 psArrayAdd (sources, 100, source); 103 107 psFree (source);
Note:
See TracChangeset
for help on using the changeset viewer.
