Changeset 36834 for trunk/psModules/src/objects/pmPSFtryMakePSF.c
- Timestamp:
- Jun 7, 2014, 6:37:32 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmPSFtryMakePSF.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmPSFtryMakePSF.c
r36623 r36834 220 220 } 221 221 222 // weed out extreme e0 outliers here: find the median and exclude points not in the 223 // range MEDIAN / 5 < e0 < 5 * MEDIAN 224 { 225 psStats *e0stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN); 226 if (psVectorStats (e0stats, e0, NULL, srcMask, 0xff)) { 227 float e0med = e0stats->sampleMedian; 228 229 for (int i = 0; i < sources->n; i++) { 230 // skip any masked sources (failed to fit one of the model steps or get a magnitude) 231 if (srcMask->data.PS_TYPE_VECTOR_MASK_DATA[i]) continue; 232 233 if (e0->data.F32[i] < 0.2*e0med) { 234 srcMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = PSFTRY_MASK_OUTLIER; 235 } 236 if (e0->data.F32[i] > 5.0*e0med) { 237 srcMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = PSFTRY_MASK_OUTLIER; 238 } 239 } 240 } 241 psFree (e0stats); 242 } 243 222 244 // we run 'clipIter' cycles clipping in each of x and y, with only one iteration each. 223 245 // This way, the parameters masked by one of the fits will be applied to the others
Note:
See TracChangeset
for help on using the changeset viewer.
