Changeset 17312
- Timestamp:
- Apr 2, 2008, 8:03:08 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080324/psphot/src/psphotApResid.c
r17110 r17312 267 267 psStatsInit (statsM); 268 268 269 psVectorStats (statsS, dASubset, NULL, mkSubset, 0xff); 270 psVectorStats (statsM, dMSubset, NULL, mkSubset, 0xff); 271 272 dSo->data.F32[i] = statsS->robustStdev; 273 dMo->data.F32[i] = statsM->sampleMean; 274 275 dRo->data.F32[i] = statsS->robustStdev / statsM->sampleMean; 269 if (j > 2) { 270 bool status = true; 271 status &= psVectorStats (statsS, dASubset, NULL, mkSubset, 0xff); 272 status &= psVectorStats (statsM, dMSubset, NULL, mkSubset, 0xff); 273 if (!status) { psErrorClear (); } 274 dSo->data.F32[i] = statsS->robustStdev; 275 dMo->data.F32[i] = statsM->sampleMean; 276 dRo->data.F32[i] = statsS->robustStdev / statsM->sampleMean; 277 } else { 278 dSo->data.F32[i] = NAN; 279 dMo->data.F32[i] = NAN; 280 dRo->data.F32[i] = NAN; 281 } 276 282 } 277 283 psFree (dMSubset); … … 280 286 281 287 psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN); 282 psVectorStats (stats, dRo, NULL, NULL, 0); 288 if (!psVectorStats (stats, dRo, NULL, NULL, 0)) { 289 // XXX better testing of raised error 290 psErrorClear(); 291 } 283 292 284 293 *errorScale = stats->sampleMedian;
Note:
See TracChangeset
for help on using the changeset viewer.
