Changeset 17730
- Timestamp:
- May 16, 2008, 4:38:46 PM (18 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 2 edited
-
pmFPAMaskWeight.c (modified) (1 diff)
-
pmFPAMaskWeight.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMaskWeight.c
r17692 r17730 404 404 return true; 405 405 } 406 407 408 409 bool pmSubtractionMaskApply(pmReadout *readout, psMaskType maskVal) 410 { 411 PM_ASSERT_READOUT_NON_NULL(readout, false); 412 PM_ASSERT_READOUT_IMAGE(readout, false); 413 PM_ASSERT_READOUT_MASK(readout, false); 414 415 int numCols = image->numCols, numRows = image->numRows; // Size of image 416 psMaskType **maskData = mask->data.PS_TYPE_MASK_DATA; // Dereference mask 417 psF32 **imageData = image->data.F32;// Dereference image 418 psF32 **weightData = weight->data.F32; // Dereference weight map 419 420 for (int y = 0; y < numRows; y++) { 421 for (int x = 0; x < numCols; x++) { 422 if (maskData[y][x] & maskVal) { 423 imageData[y][x] = NAN; 424 if (weight) { 425 weightData[y][x] = NAN; 426 } 427 } 428 } 429 } 430 431 return true; 432 } -
trunk/psModules/src/camera/pmFPAMaskWeight.h
r17692 r17730 5 5 * @author Eugene Magnier, IfA 6 6 * 7 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $8 * @date $Date: 2008-05-1 5 03:25:10$7 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2008-05-17 02:38:46 $ 9 9 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 10 10 */ … … 115 115 ); 116 116 117 /// Apply a mask to the image and weight map 118 /// 119 /// Unfortunately, image subtraction may result in a bi-modal image in masked areas, which can upset image 120 /// statistics (very important for quantising images so that a product can be written out!). This function 121 /// sets masked areas to NAN in the image and weight. 122 bool pmSubtractionMaskApply(pmReadout *readout, ///< Readout to mask 123 psMaskType maskVal ///< Mask value for which to apply mask 124 ); 125 126 117 127 /// @} 118 128 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
