Changeset 10240
- Timestamp:
- Nov 28, 2006, 12:33:43 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAMaskWeight.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMaskWeight.c
r10075 r10240 207 207 } 208 208 209 // Set weight image to the variance in ADU = f/g + rn^2 210 psImage *image = readout->image; // The image pixels 211 readout->weight = (psImage*)psBinaryOp(readout->weight, image, "/", psScalarAlloc(gain, PS_TYPE_F32)); 212 213 // a negative weight is non-sensical. if the image value drops below 1, the weight must be 1. 214 readout->weight = (psImage*)psUnaryOp(readout->weight, readout->weight, "abs"); 215 readout->weight = (psImage*)psBinaryOp(readout->weight, readout->weight, "max", psScalarAlloc(1, PS_TYPE_F32)); 209 if (gain > 0.0) { 210 // Set weight image to the variance in ADU = f/g + rn^2 211 psImage *image = readout->image; // The image pixels 212 readout->weight = (psImage*)psBinaryOp(readout->weight, image, "/", psScalarAlloc(gain, PS_TYPE_F32)); 213 214 // a negative weight is non-sensical. if the image value drops below 1, the weight must be 1. 215 readout->weight = (psImage*)psUnaryOp(readout->weight, readout->weight, "abs"); 216 readout->weight = (psImage*)psBinaryOp(readout->weight, readout->weight, "max", 217 psScalarAlloc(1, PS_TYPE_F32)); 218 } else { 219 // Gain is negative or zero --- just use the read noise 220 psImageInit(readout->weight, 0.0); 221 } 216 222 217 223 readout->weight = (psImage*)psBinaryOp(readout->weight, readout->weight, "+",
Note:
See TracChangeset
for help on using the changeset viewer.
