Changeset 23989 for trunk/psModules/src/imcombine/pmReadoutCombine.c
- Timestamp:
- Apr 28, 2009, 11:21:56 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmReadoutCombine.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmReadoutCombine.c
r21363 r23989 384 384 // Combination 385 385 if (!psVectorStats(stats, pixels, errors, mask, 1)) { 386 // Can't do much about it, but it's not worth worrying about 387 psErrorClear(); 386 psError(PS_ERR_UNKNOWN, false, "error in pixel stats"); 387 return false; 388 } 389 390 outputImage[yOut][xOut] = psStatsGetValue(stats, params->combine); 391 392 if (isnan(outputImage[yOut][xOut])) { 388 393 outputImage[yOut][xOut] = NAN; 389 394 outputMask[yOut][xOut] = params->blank; 395 sigma->data.F32[yOut][xOut] = NAN; 390 396 if (params->variances) { 391 397 outputVariance[yOut][xOut] = NAN; 392 398 } 393 sigma->data.F32[yOut][xOut] = NAN; 394 } else { 395 outputImage[yOut][xOut] = psStatsGetValue(stats, params->combine); 396 outputMask[yOut][xOut] = isfinite(outputImage[yOut][xOut]) ? 0 : params->blank; 397 if (params->variances) { 398 float stdev = psStatsGetValue(stats, combineStdev); 399 outputVariance[yOut][xOut] = PS_SQR(stdev); // Variance 400 // XXXX this is not the correct formal error. 401 // also, the weighted mean is not obviously the correct thing here 402 } 403 sigma->data.F32[yOut][xOut] = psStatsGetValue(stats, combineStdev); 404 } 399 continue; 400 } 401 outputMask[yOut][xOut] = 0; 402 sigma->data.F32[yOut][xOut] = psStatsGetValue(stats, combineStdev); 403 if (params->variances) { 404 float stdev = psStatsGetValue(stats, combineStdev); 405 outputVariance[yOut][xOut] = PS_SQR(stdev); // Variance 406 // XXXX this is not the correct formal error. 407 // also, the weighted mean is not obviously the correct thing here 408 } 405 409 } 406 410 }
Note:
See TracChangeset
for help on using the changeset viewer.
