Changeset 42889 for trunk/psModules/src/detrend/pmOverscan.h
- Timestamp:
- Jun 5, 2025, 3:33:01 PM (14 months ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmOverscan.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmOverscan.h
r42379 r42889 18 18 19 19 /// Type of fit to perform 20 typedef enum { 21 PM_FIT_NONE, ///< No fit 22 PM_FIT_POLY_ORD, ///< Fit ordinary polynomial 23 PM_FIT_POLY_CHEBY, ///< Fit Chebyshev polynomial 24 PM_FIT_SPLINE ///< Fit cubic splines 20 typedef enum 21 { 22 PM_FIT_NONE, ///< No fit 23 PM_FIT_POLY_ORD, ///< Fit ordinary polynomial 24 PM_FIT_POLY_CHEBY, ///< Fit Chebyshev polynomial 25 PM_FIT_SPLINE ///< Fit cubic splines 25 26 } pmFit; 26 27 … … 35 36 { 36 37 // 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 pmFit fitType; ///< Type of fit to overscan 41 unsigned int order; ///< Order of polynomial, or number of spline pieces 42 psStats *stat; ///< Statistic to use when reducing the minor direction 43 int boxcar; ///< Boxcar smoothing radius 44 float gauss; ///< Gaussian smoothing sigma 45 float minValid; ///< if overscan is too low, readout is dead : mask 46 float maxValid; ///< if overscan is too high, readout is dead : mask 47 psImageMaskType maskVal; ///< Mask value to give dead readouts 38 pmFit fitType; ///< Type of fit to overscan 39 unsigned int order; ///< Order of polynomial, or number of spline pieces 40 psStats *stat; ///< Statistic to use when reducing the minor direction 41 int boxcar; ///< Boxcar smoothing radius 42 float gauss; ///< Gaussian smoothing sigma 43 psRegion biassecslow; ///< The 2D slow bias section 44 psRegion biassecfast; ///< The 2D fast bias section 48 45 49 // Outputs 50 psPolynomial1D *poly; ///< Result of polynomial fit 51 psSpline1D *spline; ///< Result of spline fit 52 } 53 pmOverscanOptions; 46 47 // These are used to carry the fitted functions, but are only used to generate 48 // an updated reduced vector 49 psPolynomial1D *poly; ///< Result of polynomial fit 50 psSpline1D *spline; ///< Result of spline fit 51 } pmOverscanStatOptions; 52 53 /// Options for overscan subtraction 54 /// 55 /// The overscan subtraction may be performed by reducing all overscan regions to a single value (e.g., if 56 /// there is no structure); or the overscan may be fit perpendicular to the read direction (usually the 57 /// columns) with a particular functional form; or a single value may be subtracted for each read/scan without 58 /// fitting (if the structure defies characterisation). In any case, statistics are required to reduce 59 /// multiple values to a single value (either for the scan, or for the entire overscan regions). 60 typedef struct 61 { 62 // Inputs 63 bool single; ///< Reduce all overscan regions to a single value? 64 bool constant; ///< use a supplied constant value (do not measure region) 65 bool TwoD; ///< use a supplied constant value (do not measure region) 66 float value; ///< supplied value if needed (per above) 67 float minValid; ///< if overscan is too low, readout is dead : mask 68 float maxValid; ///< if overscan is too high, readout is dead : mask 69 psImageMaskType maskVal; ///< Mask value to give dead readouts 70 71 pmOverscanStatOptions *primary; 72 pmOverscanStatOptions *secondary; 73 } pmOverscanOptions; 54 74 55 75 /// 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 ); 76 pmOverscanOptions *pmOverscanOptionsAlloc(void); 63 77 64 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 68 ); 78 pmOverscanStatOptions *pmOverscanStatOptionsAlloc(void); 69 79 70 bool pmOverscanUpdateHeader (pmHDU *hdu, pmOverscanOptions *overscanOpts, float chi2); 80 psVector *pmOverscanVector(float *chi2, // chi^2 from fit 81 pmOverscanStatOptions *overscanOpts, // Overscan options 82 const psArray *pixels, // Array of vectors containing the pixel values 83 bool robust // use robust statistics for boxcar smoothing 84 ); 71 85 72 bool pmOverscanSubtract (pmReadout *input, pmOverscanOptions *overscanOpts); 86 // bool pmOverscanUpdateHeader (pmHDU *hdu, pmOverscanOptions *overscanOpts, float chi2); 87 88 bool pmOverscanSubtract(pmReadout *input, pmOverscanOptions *overscanOpts, bool doTwoDOverscan); 73 89 74 90 /// @} 75 91 #endif 76
Note:
See TracChangeset
for help on using the changeset viewer.
