Changeset 13870 for trunk/psModules/src/detrend/pmShutterCorrection.h
- Timestamp:
- Jun 18, 2007, 5:40:48 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmShutterCorrection.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmShutterCorrection.h
r12988 r13870 5 5 * @author Paul Price, IfA 6 6 * 7 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2007-0 4-24 21:17:19$7 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2007-06-19 03:40:48 $ 9 9 * Copyright 2006 Institute for Astronomy, University of Hawaii 10 10 */ … … 128 128 ); 129 129 130 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 131 132 // Functions for doing the shutter correction piece-meal (don't have to read entire image stack into memory at 133 // once). A single read run through the stack is required, calling pmShutterCorrectionAddReadout on each. 134 // Then pmShutterCorrectionReference provides the required reference shutter time, so that 135 // pmShutterCorrectionGenerate can generate a shutter correction piece by piece as overlapping pixels from 136 // each input are read in. 137 138 139 /// Data for measuring the shutter correction 140 typedef struct { 141 int num; ///< Number of images 142 int numCols, numRows; ///< Size of images 143 psArray *regions; ///< Regions at which to measure statistics 144 psArray *mean; ///< Vector of means at each region 145 psArray *stdev; ///< Vector of standard deviations at each region 146 psVector *exptimes; ///< Exposure times for each image 147 psVector *refs; ///< Reference fluxes 148 } pmShutterCorrectionData; 149 150 /// Allocator for pmShutterCorrectionData 151 pmShutterCorrectionData *pmShutterCorrectionDataAlloc(int numCols, int numRows, ///< Size of images 152 int size ///< Size of regions 153 ); 154 155 /// Add a readout to the correction data 156 /// 157 /// Performs statistics on the readout, recording the data 158 bool pmShutterCorrectionAddReadout(pmShutterCorrectionData *data, ///< Correction data 159 const pmReadout *readout, ///< Readout to add 160 psStatsOptions meanStat, ///< Statistic to use for mean 161 psStatsOptions stdevStat, ///< Statistic to use for stdev 162 psMaskType maskVal, ///< Mask value 163 psRandom *rng ///< Random number generator 164 ); 165 166 /// Calculate the reference shutter time from the correction data 167 float pmShutterCorrectionReference(const pmShutterCorrectionData *data ///< Correction data 168 ); 169 170 /// Generate a shutter correction 171 /// 172 /// Performs the linear fit to each pixel in the stack. 173 bool pmShutterCorrectionGenerate(pmReadout *shutter, ///< Shutter correction 174 pmReadout *pattern, ///< Background pattern (or NULL) 175 const psArray *inputs, ///< Stack of input pmReadouts 176 float reference, ///< Reference shutter time (from pmShutterCorrectionRef) 177 const pmShutterCorrectionData *data, ///< Correction data 178 int nIter, ///< Number of iterations 179 float rej, ///< Rejection threshold (sigma) 180 psMaskType maskVal ///< Mask value 181 ); 182 183 184 130 185 /// @} 131 186 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
