Changeset 42842 for trunk/psphot/src/psphotMaskReadout.c
- Timestamp:
- May 9, 2025, 11:21:40 AM (14 months ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphotMaskReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20230313/psphot (added) merged: 42435,42439,42507-42510,42529,42582,42612,42707,42711
- Property svn:mergeinfo changed
-
trunk/psphot/src/psphotMaskReadout.c
r34293 r42842 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.
