Changeset 25609
- Timestamp:
- Sep 27, 2009, 10:49:56 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/psphot/src/psphotMaskReadout.c
r24484 r25609 33 33 } 34 34 35 bool softenVariance = psMetadataLookupBool (&status, recipe, "SOFTEN.VARIANCE"); 36 float softenFraction = psMetadataLookupF32 (&status, recipe, "SOFTEN.VARIANCE.FRACTION"); 37 35 38 // make this an option via the recipe 36 if ( 0) {39 if (softenVariance) { 37 40 psImage *im = readout->image; 38 41 psImage *wt = readout->variance; 39 psImage *mk = readout->mask;40 42 for (int j = 0; j < im->numRows; j++) { 41 43 for (int i = 0; i < im->numCols; i++) { 42 if (isfinite(im->data.F32[j][i]) && isfinite(wt->data.F32[j][i])) continue; 43 mk->data.PS_TYPE_IMAGE_MASK_DATA[j][i] |= maskBad; 44 if (!isfinite(im->data.F32[j][i])) continue; 45 if (!isfinite(wt->data.F32[j][i])) continue; 46 float sysError = softenFraction * im->data.F32[j][i]; 47 wt->data.F32[j][i] += PS_SQR(sysError); 44 48 } 45 49 }
Note:
See TracChangeset
for help on using the changeset viewer.
