- Timestamp:
- Jul 5, 2024, 12:30:50 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20230313/psphot/src/psphotMaskReadout.c
r34293 r42711 58 58 return false; 59 59 } 60 } 61 62 // XXX test to repair variance 63 if (true) { 64 psImage *im = readout->image; 65 psImage *wt = readout->variance; 66 float maxVar = 0; 67 // find the max value 68 for (int j = 0; j < im->numRows; j++) { 69 for (int i = 0; i < im->numCols; i++) { 70 if (!isfinite(wt->data.F32[j][i])) continue; 71 maxVar = PS_MAX (wt->data.F32[j][i], maxVar); 72 } 73 } 74 // set pixels with nan variance and non-nan image to maxVar 75 for (int j = 0; j < im->numRows; j++) { 76 for (int i = 0; i < im->numCols; i++) { 77 if (!isfinite(im->data.F32[j][i])) continue; 78 if (isfinite(wt->data.F32[j][i])) continue; 79 wt->data.F32[j][i] = maxVar; 80 } 81 } 60 82 } 61 83
Note:
See TracChangeset
for help on using the changeset viewer.
