Changeset 29459
- Timestamp:
- Oct 17, 2010, 9:23:37 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c
r29347 r29459 219 219 220 220 // model the distribution as a mean or median value and a systematic error from that value: 221 psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); 221 // psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); 222 psStats *stats = psStatsAlloc(PS_STAT_CLIPPED_MEAN); 222 223 psVectorStats (stats, Ap, NULL, NULL, 0); 223 224 224 225 psVector *dAp = psVectorAlloc (Ap->n, PS_TYPE_F32); 225 226 for (int i = 0; i < Ap->n; i++) { 226 dAp->data.F32[i] = Ap->data.F32[i] - stats-> robustMedian;227 } 228 229 options->ApResid = stats-> robustMedian;230 options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0. 05);227 dAp->data.F32[i] = Ap->data.F32[i] - stats->clippedMean; 228 } 229 230 options->ApResid = stats->clippedMean; 231 options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0.1); 231 232 // XXX this is quite arbitrary... 232 233 if (!isfinite(options->ApSysErr)) options->ApSysErr = 0.01; … … 361 362 362 363 // set nSigma to include both systematic and poisson error terms 364 // XXX need to handle NAN psfMag and apMag (ie, skip?) 363 365 // XXX the 'poisson error' contribution for size is probably wrong... 364 366 // XXX add in a hard floor on the Ap Sys Err (to be a bit generous)
Note:
See TracChangeset
for help on using the changeset viewer.
