Changeset 42664 for branches/2dbias/psModules/src/detrend/pmOverscan.h
- Timestamp:
- Apr 23, 2024, 5:54:26 PM (2 years ago)
- Location:
- branches/2dbias/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/detrend/pmOverscan.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/2dbias/psModules
- Property svn:mergeinfo changed
/branches/eam_branches/psModules.20240412 (added) merged: 42651-42654,42659
- Property svn:mergeinfo changed
-
branches/2dbias/psModules/src/detrend/pmOverscan.h
r42379 r42664 35 35 { 36 36 // Inputs 37 bool single; ///< Reduce all overscan regions to a single value?38 bool constant; ///< use a supplied constant value (do not measure region)39 float value; ///< supplied value if needed (per above)40 37 pmFit fitType; ///< Type of fit to overscan 41 38 unsigned int order; ///< Order of polynomial, or number of spline pieces … … 43 40 int boxcar; ///< Boxcar smoothing radius 44 41 float gauss; ///< Gaussian smoothing sigma 42 43 // These are used to carry the fitted functions, but are only used to generate 44 // an updated reduced vector 45 psPolynomial1D *poly; ///< Result of polynomial fit 46 psSpline1D *spline; ///< Result of spline fit 47 } pmOverscanStatOptions; 48 49 /// Options for overscan subtraction 50 /// 51 /// The overscan subtraction may be performed by reducing all overscan regions to a single value (e.g., if 52 /// there is no structure); or the overscan may be fit perpendicular to the read direction (usually the 53 /// columns) with a particular functional form; or a single value may be subtracted for each read/scan without 54 /// fitting (if the structure defies characterisation). In any case, statistics are required to reduce 55 /// multiple values to a single value (either for the scan, or for the entire overscan regions). 56 typedef struct 57 { 58 // Inputs 59 bool single; ///< Reduce all overscan regions to a single value? 60 bool constant; ///< use a supplied constant value (do not measure region) 61 bool TwoD; ///< use a supplied constant value (do not measure region) 62 float value; ///< supplied value if needed (per above) 45 63 float minValid; ///< if overscan is too low, readout is dead : mask 46 64 float maxValid; ///< if overscan is too high, readout is dead : mask 47 65 psImageMaskType maskVal; ///< Mask value to give dead readouts 48 66 49 // Outputs 50 psPolynomial1D *poly; ///< Result of polynomial fit 51 psSpline1D *spline; ///< Result of spline fit 52 } 53 pmOverscanOptions; 67 pmOverscanStatOptions *primary; 68 pmOverscanStatOptions *secondary; 69 } pmOverscanOptions; 54 70 55 71 /// Allocator for overscan options 56 pmOverscanOptions *pmOverscanOptionsAlloc(bool single, ///< Reduce all overscan regions to a single value? 57 pmFit fitType, ///< Type of fit to overscan 58 unsigned int order, ///< Order of polynomial, or number of splines 59 psStats *stat, ///< Statistic to use 60 int boxcar, ///< Boxcar smoothing radius 61 float gauss ///< Gaussian smoothing sigma 62 ); 72 pmOverscanOptions *pmOverscanOptionsAlloc(void); 73 74 pmOverscanStatOptions *pmOverscanStatOptionsAlloc(void); 63 75 64 76 psVector *pmOverscanVector(float *chi2, // chi^2 from fit 65 pmOverscanOptions *overscanOpts, // Overscan options 66 const psArray *pixels, // Array of vectors containing the pixel values 67 psStats *myStats // Statistic to use in reducing the overscan 77 pmOverscanStatOptions *overscanOpts, // Overscan options 78 const psArray *pixels // Array of vectors containing the pixel values 68 79 ); 69 80 70 bool pmOverscanUpdateHeader (pmHDU *hdu, pmOverscanOptions *overscanOpts, float chi2);81 // bool pmOverscanUpdateHeader (pmHDU *hdu, pmOverscanOptions *overscanOpts, float chi2); 71 82 72 83 bool pmOverscanSubtract (pmReadout *input, pmOverscanOptions *overscanOpts);
Note:
See TracChangeset
for help on using the changeset viewer.
