Changeset 10247 for trunk/psModules/src/camera/pmFPAMaskWeight.c
- Timestamp:
- Nov 28, 2006, 3:26:24 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAMaskWeight.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMaskWeight.c
r10245 r10247 188 188 } 189 189 190 bool pmReadoutSetWeight(pmReadout *readout )190 bool pmReadoutSetWeight(pmReadout *readout, bool poisson) 191 191 { 192 192 PS_ASSERT_PTR_NON_NULL(readout, false); … … 207 207 } 208 208 209 if ( gain > 0.0) {209 if (poisson) { 210 210 // Set weight image to the variance in ADU = f/g + rn^2 211 211 psImage *image = readout->image; // The image pixels … … 217 217 psScalarAlloc(1, PS_TYPE_F32)); 218 218 } else { 219 // Gain is negative or zero --- just use the read noise219 // Just use the read noise 220 220 if (!readout->weight) { 221 221 readout->weight = psImageAlloc(readout->image->numCols, readout->image->numRows, PS_TYPE_F32); … … 230 230 } 231 231 232 bool pmReadoutGenerateWeight(pmReadout *readout )232 bool pmReadoutGenerateWeight(pmReadout *readout, bool poisson) 233 233 { 234 234 PS_ASSERT_PTR_NON_NULL(readout, false); … … 273 273 } 274 274 275 return pmReadoutSetWeight(readout );276 } 277 278 bool pmReadoutGenerateMaskWeight(pmReadout *readout )275 return pmReadoutSetWeight(readout, poisson); 276 } 277 278 bool pmReadoutGenerateMaskWeight(pmReadout *readout, bool poisson) 279 279 { 280 280 PS_ASSERT_PTR_NON_NULL(readout, false); … … 283 283 284 284 success |= pmReadoutGenerateMask(readout); 285 success |= pmReadoutGenerateWeight(readout );285 success |= pmReadoutGenerateWeight(readout, poisson); 286 286 287 287 return success; 288 288 } 289 289 290 bool pmCellGenerateMaskWeight(pmCell *cell )290 bool pmCellGenerateMaskWeight(pmCell *cell, bool poisson) 291 291 { 292 292 PS_ASSERT_PTR_NON_NULL(cell, false); … … 296 296 for (int i = 0; i < readouts->n; i++) { 297 297 pmReadout *readout = readouts->data[i]; // The readout 298 pmReadoutGenerateMaskWeight(readout );298 pmReadoutGenerateMaskWeight(readout, poisson); 299 299 } 300 300
Note:
See TracChangeset
for help on using the changeset viewer.
