Changeset 18554 for trunk/psModules/src/detrend/pmMaskBadPixels.c
- Timestamp:
- Jul 15, 2008, 10:25:00 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmMaskBadPixels.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmMaskBadPixels.c
r18364 r18554 123 123 psTrace ("psModules.detrend", 3, "suspect: %f +/- %f\n", median, stdev); 124 124 125 // XXX this loop could result in pixels with suspect = 0.0 but no valid input pixels (all 126 // masked). need to track the number of good as well as suspect pixels? 125 127 for (int y = 0; y < image->numRows; y++) { 126 128 for (int x = 0; x < image->numCols; x++) { 127 if (fabs((image->data.F32[y][x] - median) / stdev) >= rej && 128 (!mask || !(mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal))) { 129 suspect->data.F32[y][x] += 1.0; 130 } 129 if (fabs((image->data.F32[y][x] - median) / stdev) < rej) continue; 130 if (mask && (mask->data.PS_TYPE_MASK_DATA[y][x] & maskVal)) continue; 131 suspect->data.F32[y][x] += 1.0; 131 132 } 132 133 } … … 140 141 } 141 142 143 // the maskVal supplied here is the value SET for this mask (ie, it is not used to avoid pixels) 142 144 bool pmMaskIdentifyBadPixels(pmReadout *output, psMaskType maskVal, float thresh, pmMaskIdentifyMode mode) 143 145 {
Note:
See TracChangeset
for help on using the changeset viewer.
