Changeset 17337
- Timestamp:
- Apr 6, 2008, 10:12:58 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080324/psphot/src/psphotSourceStats.c
r16820 r17337 37 37 for (int i = 0; i < peaks->n; i++) { 38 38 39 pmPeak *peak = peaks->data[i]; 40 if (peak->assigned) continue; 41 39 42 // create a new source, add peak 40 43 pmSource *source = pmSourceAlloc(); 41 source->peak = (pmPeak *)psMemIncrRefCounter(peaks->data[i]);44 source->peak = psMemIncrRefCounter(peak); 42 45 43 46 // allocate image, weight, mask arrays for each peak (square of radius OUTER) 44 47 pmSourceDefinePixels (source, readout, source->peak->x, source->peak->y, OUTER); 45 48 if (!strcasecmp (breakPt, "PEAKS")) { 49 peak->assigned = true; 46 50 psArrayAdd (sources, 100, source); 47 51 psFree (source); … … 49 53 } 50 54 51 // skip faint sources 55 // skip faint sources for moments measurement 52 56 if (source->peak->SN < MIN_SN) { 57 peak->assigned = true; 53 58 psArrayAdd (sources, 100, source); 54 59 psFree (source); … … 57 62 58 63 // measure a local sky value 59 // XXX EAM : this should use ROBUST not SAMPLE median, but it is broken 64 // the local sky is now ignored; kept here for reference only 60 65 status = pmSourceLocalSky (source, PS_STAT_SAMPLE_MEDIAN, INNER, maskVal, mark); 61 66 if (!status) { … … 80 85 if (status) { 81 86 // add to the source array 87 peak->assigned = true; 82 88 psArrayAdd (sources, 100, source); 83 89 psFree (source); … … 93 99 if (status) { 94 100 // add to the source array 101 peak->assigned = true; 95 102 psArrayAdd (sources, 100, source); 96 103 psFree (source);
Note:
See TracChangeset
for help on using the changeset viewer.
