Changeset 21363 for trunk/psModules/src/camera/pmFPAMaskWeight.h
- Timestamp:
- Feb 5, 2009, 4:31:25 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAMaskWeight.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMaskWeight.h
r21183 r21363 5 5 * @author Eugene Magnier, IfA 6 6 * 7 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2009-0 1-27 06:39:38$7 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2009-02-06 02:31:24 $ 9 9 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 10 10 */ … … 47 47 48 48 49 /// Set a temporary readout weightmap using CELL.GAIN and CELL.READNOISE49 /// Set a temporary readout variance map using CELL.GAIN and CELL.READNOISE 50 50 /// 51 /// Calculates weights (actually variances) for each pixel using photon statistics and the cell gain52 /// (CELL. GAIN) and read noise (CELL.READNOISE). The weight map that is produced within the readout is53 /// t emporary --- it is not added to the HDU. This is intended for when the user is iterating using54 /// pmReadoutReadNext, in which case the HDUcan't be generated.55 bool pmReadoutSet Weight(pmReadout *readout, ///< Readout for which to set weight56 bool poisson ///< Use poisson weights(in addition to read noise)?57 );51 /// Calculates variances for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise 52 /// (CELL.READNOISE). The weight map that is produced within the readout is temporary --- it is not added to 53 /// the HDU. This is intended for when the user is iterating using pmReadoutReadNext, in which case the HDU 54 /// can't be generated. 55 bool pmReadoutSetVariance(pmReadout *readout, ///< Readout for which to set variance 56 bool poisson ///< Include poisson variance (in addition to read noise)? 57 ); 58 58 59 59 /// Generate a readout mask (suitable for output) using CELL.SATURATION and CELL.BAD … … 66 66 ); 67 67 68 /// Generate a weightmap (suitable for output) using CELL.GAIN and CELL.READNOISE68 /// Generate a variance map (suitable for output) using CELL.GAIN and CELL.READNOISE 69 69 /// 70 /// Calculates weights (actually variances) for each pixel using photon statistics and the cell gain71 /// (CELL. GAIN) and read noise (CELL.READNOISE). The weight map that is produced within the readout is72 /// suitable for output (completewith HDU entry). This is intended for most operations.73 bool pmReadoutGenerate Weight(pmReadout *readout, ///< Readout for which to generate weight74 bool poisson ///< Use poisson weights(in addition to read noise)?75 );70 /// Calculates variances for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise 71 /// (CELL.READNOISE). The variance map that is produced within the readout is suitable for output (complete 72 /// with HDU entry). This is intended for most operations. 73 bool pmReadoutGenerateVariance(pmReadout *readout, ///< Readout for which to generate variance 74 bool poisson ///< Include poisson variance (in addition to read noise)? 75 ); 76 76 77 /// Generate mask and weightmap for a readout77 /// Generate mask and variance map for a readout 78 78 /// 79 /// Calls pmReadoutGenerateMask and pmReadoutGenerate Weightfor the readout80 bool pmReadoutGenerateMask Weight(pmReadout *readout, ///< Readout for which to generate mask and weights81 psImageMaskType sat, ///< Mask value to give saturated pixels82 psImageMaskType bad, ///< Mask value to give bad (low) pixels83 bool poisson ///< Use poisson weights(in addition to read noise)?84 );79 /// Calls pmReadoutGenerateMask and pmReadoutGenerateVariance for the readout 80 bool pmReadoutGenerateMaskVariance(pmReadout *readout, ///< Readout for which to generate mask and variance 81 psImageMaskType sat, ///< Mask value to give saturated pixels 82 psImageMaskType bad, ///< Mask value to give bad (low) pixels 83 bool poisson ///< Include poisson variance (in addition to read noise)? 84 ); 85 85 86 /// Generate mask and weightmaps for all readouts within a cell86 /// Generate mask and variance maps for all readouts within a cell 87 87 /// 88 /// Calls pmReadoutGenerateMask Weightfor each readout within the cell.89 bool pmCellGenerateMask Weight(pmCell *cell, ///< Cell for which to generate mask and weights90 psImageMaskType sat, ///< Mask value to give saturated pixels91 psImageMaskType bad, ///< Mask value to give bad (low) pixels92 bool poisson ///< Use poisson weights(in addition to read noise)?93 );88 /// Calls pmReadoutGenerateMaskVariance for each readout within the cell. 89 bool pmCellGenerateMaskVariance(pmCell *cell, ///< Cell for which to generate mask and variance 90 psImageMaskType sat, ///< Mask value to give saturated pixels 91 psImageMaskType bad, ///< Mask value to give bad (low) pixels 92 bool poisson ///< Include poisson variance (in addition to read noise)? 93 ); 94 94 95 /// Renormalise the weightmap to match the actual pixel variance95 /// Renormalise the variance map to match the actual pixel variance 96 96 /// 97 /// The weight (variance)map is adjusted so that the mean matches the actual pixel variance in the image98 bool pmReadout WeightRenormPixels(97 /// The variance map is adjusted so that the mean matches the actual pixel variance in the image 98 bool pmReadoutVarianceRenormPixels( 99 99 const pmReadout *readout, ///< Readout to normalise 100 100 psImageMaskType maskVal, ///< Value to mask … … 104 104 ); 105 105 106 /// Renormalise the weightmap to match the actual photometry variance106 /// Renormalise the variance map to match the actual photometry variance 107 107 /// 108 /// The weight (variance)map is adjusted so that the actual significance of fake sources matches the108 /// The variance map is adjusted so that the actual significance of fake sources matches the 109 109 /// guestimated significance 110 bool pmReadout WeightRenormPhot(110 bool pmReadoutVarianceRenormPhot( 111 111 const pmReadout *readout, ///< Readout to normalise 112 psImageMaskType maskVal, ///< Value to mask112 psImageMaskType maskVal, ///< Value to mask 113 113 int num, ///< Number of instances to measure over the image 114 114 float width, ///< Photometry width … … 118 118 ); 119 119 120 /// Renormalise the weightmap to match the actual variance120 /// Renormalise the variance map to match the actual variance 121 121 /// 122 122 /// The variance in the image is measured in patches, and the variance map is adjusted so that the mean for 123 123 /// that patch corresponds. 124 bool pmReadout WeightRenorm(const pmReadout *readout, // Readout to normalise125 psImageMaskType maskVal, // Value to mask126 psStatsOptions meanStat, // Statistic to measure the mean (of the variance map)127 psStatsOptions stdevStat, // Statistic to measure the stdev (of the image)128 int width, // Width of patch (pixels)129 psRandom *rng // Random number generator (for sub-sampling images)124 bool pmReadoutVarianceRenorm(const pmReadout *readout, // Readout to normalise 125 psImageMaskType maskVal, // Value to mask 126 psStatsOptions meanStat, // Statistic to measure the mean (of the variance map) 127 psStatsOptions stdevStat, // Statistic to measure the stdev (of the image) 128 int width, // Width of patch (pixels) 129 psRandom *rng // Random number generator (for sub-sampling images) 130 130 ); 131 131 … … 133 133 /// 134 134 /// Since unmasked non-finite pixels can occur (e.g., by out-of-range in quantisation), it is sometimes 135 /// necessary to mask them explicitly. Non-finite pixels in the image or weighthave their mask OR-ed with135 /// necessary to mask them explicitly. Non-finite pixels in the image or variance have their mask OR-ed with 136 136 /// the provided value. 137 137 bool pmReadoutMaskNonfinite(pmReadout *readout, ///< Readout to mask … … 139 139 ); 140 140 141 /// Apply a mask to the image and weightmap141 /// Apply a mask to the image and variance map 142 142 /// 143 143 /// Unfortunately, image subtraction may result in a bi-modal image in masked areas, which can upset image 144 144 /// statistics (very important for quantising images so that a product can be written out!). This function 145 /// sets masked areas to NAN in the image and weight.145 /// sets masked areas to NAN in the image and variance. 146 146 bool pmReadoutMaskApply(pmReadout *readout, ///< Readout to mask 147 147 psImageMaskType maskVal ///< Mask value for which to apply mask
Note:
See TracChangeset
for help on using the changeset viewer.
