00001 #ifndef PM_READOUT_MASK_WEIGHT_H 00002 #define PM_READOUT_MASK_WEIGHT_H 00003 00004 #include "pmFPA.h" 00005 00006 // these defines are necessary to yield 8-bit results (use instead of ~) 00007 #define NOT_U8(A)(UCHAR_MAX-(A)) 00008 #define NOT_U16(A)(USHORT_MAX-(A)) 00009 00010 /** Mask values */ 00011 typedef enum { 00012 PM_MASK_CLEAR = 0x00, ///< The pixel is not masked 00013 PM_MASK_TRAP = 0x01, ///< The pixel is a charge trap. 00014 PM_MASK_BADCOL = 0x02, ///< The pixel is a bad column. 00015 PM_MASK_SAT = 0x04, ///< The pixel is saturated. 00016 PM_MASK_BAD = 0x08, ///< The pixel is low 00017 PM_MASK_FLAT = 0x10, ///< The pixel is non-positive in the flat-field. 00018 PM_MASK_MARK = 0x20, ///< The pixel is marked as temporarily ignored 00019 PM_MASK_EXT1 = 0x40, ///< This mask value is not used 00020 PM_MASK_EXT2 = 0x80, ///< This mask value is not used 00021 } pmMaskValue; 00022 00023 // These functions set an extant mask/weight (or create a throwaway one). 00024 // The throwaway case is intended for when the user is iterating using pmReadoutReadNext, in which case 00025 // the HDU can't be generated 00026 bool pmReadoutSetMask(pmReadout *readout // Readout for which to set mask 00027 ); 00028 bool pmReadoutSetWeight(pmReadout *readout // Readout for which to set weight 00029 ); 00030 00031 // These functions generate a mask/weight suitable for output (complete with HDU entry) and then set them. 00032 bool pmReadoutGenerateMask(pmReadout *readout // Readout for which to generate mask 00033 ); 00034 bool pmReadoutGenerateWeight(pmReadout *readout // Readout for which to generate weight 00035 ); 00036 00037 // These functions are conveniences for pmReadoutGenerateMask and pmReadoutGenerateWeight. 00038 bool pmCellGenerateMaskWeight(pmCell *cell // Cell for which to generate mask and weights 00039 ); 00040 bool pmReadoutGenerateMaskWeight(pmReadout *readout // Readout for which to generate mask and weights 00041 ); 00042 00043 00044 #endif
1.4.4