Changeset 9619 for trunk/psModules/src/detrend/pmSubtractBias.h
- Timestamp:
- Oct 17, 2006, 3:05:59 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmSubtractBias.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmSubtractBias.h
r7589 r9619 1 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 2 // XXX WARNING: I have completely replaced this file with an OLD VERSION (that works) instead of the 3 // one that was being worked on. 4 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 1 /// @file pmSubtractBias.h 2 /// 3 /// @brief Subtract the overscan, bias and dark 4 /// 5 /// @ingroup Detrend 6 /// 7 /// @author George Gusciora, MHPCC 8 /// @author Paul Price, IfA 9 /// 10 /// @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 /// @date $Date: 2006-10-18 01:05:59 $ 12 /// 13 /// Copyright 2004--2006 Institute for Astronomy, University of Hawaii 14 /// 5 15 6 /** @file pmSubtractBias.h 7 * 8 * This file will contain a module which will subtract the detector bias 9 * in place from an input image. 10 * 11 * @author GLG, MHPCC 12 * 13 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2006-06-17 01:50:43 $ 15 * 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 17 * 18 */ 19 20 #if !defined(PM_SUBTRACT_BIAS_H) 16 #ifndef PM_SUBTRACT_BIAS_H 21 17 #define PM_SUBTRACT_BIAS_H 22 18 23 #if HAVE_CONFIG_H 24 #include <config.h> 25 #endif 26 27 #include<stdio.h> 28 #include<math.h> 29 #include "pslib.h" 19 #include <stdio.h> 20 #include <pslib.h> 30 21 31 22 #include "pmFPA.h" 32 23 33 typedef enum { 34 PM_OVERSCAN_NONE, ///< No overscan subtraction 35 PM_OVERSCAN_EDGE, ///< Subtract the statistic of pixels along the to-be-determined readout direction 36 PM_OVERSCAN_ROWS, ///< Subtract rows 37 PM_OVERSCAN_COLUMNS, ///< Subtract columns 38 PM_OVERSCAN_ALL ///< Subtract the statistic of all pixels in overscan region 39 } pmOverscanAxis; 40 24 /// Type of fit to perform 41 25 typedef enum { 42 26 PM_FIT_NONE, ///< No fit … … 46 30 } pmFit; 47 31 32 /// Options for overscan subtraction 33 /// 34 /// The overscan subtraction may be performed by reducing all overscan regions to a single value (e.g., if 35 /// there is no structure); or the overscan may be fit perpendicular to the read direction (usually the 36 /// columns) with a particular functional form; or a single value may be subtracted for each read/scan without 37 /// fitting (if the structure defies characterisation). In any case, statistics are required to reduce 38 /// multiple values to a single value (either for the scan, or for the entire overscan regions). 48 39 typedef struct 49 40 { 50 41 // Inputs 51 bool single; // Reduce all overscan regions to a single value?52 pmFit fitType; // Type of fit to overscan53 unsigned int order; // Order of polynomial, or number of spline pieces54 psStats *stat; // Statistic to use when reducing the minor direction42 bool single; ///< Reduce all overscan regions to a single value? 43 pmFit fitType; ///< Type of fit to overscan 44 unsigned int order; ///< Order of polynomial, or number of spline pieces 45 psStats *stat; ///< Statistic to use when reducing the minor direction 55 46 // Outputs 56 psPolynomial1D *poly; // Result of polynomial fit57 psSpline1D *spline; // Result of spline fit47 psPolynomial1D *poly; ///< Result of polynomial fit 48 psSpline1D *spline; ///< Result of spline fit 58 49 } 59 50 pmOverscanOptions; 60 51 61 pmOverscanOptions *pmOverscanOptionsAlloc(bool single, pmFit fitType, unsigned int order, psStats *stat); 52 /// Allocator for overscan options 53 pmOverscanOptions *pmOverscanOptionsAlloc(bool single, ///< Reduce all overscan regions to a single value? 54 pmFit fitType, ///< Type of fit to overscan 55 unsigned int order, ///< Order of polynomial, or number of splines 56 psStats *stat ///< Statistic to use 57 ); 62 58 63 bool pmSubtractBias(pmReadout *in, pmOverscanOptions *overscanOpts, 64 const pmReadout *bias, const pmReadout *dark); 65 66 #if 0 67 pmReadout *pmSubtractBias(pmReadout *in, ///< The input pmReadout image 68 void *fitSpec, ///< A polynomial or spline, defining the fit type. 69 const psList *overscans, ///< A psList of overscan images 70 pmOverscanAxis overScanAxis, ///< Defines how overscans are applied 71 psStats *stat, ///< The statistic to be used in combining overscan data 72 int nBin, ///< The amount of binning to be done image pixels. 73 pmFit fit, ///< PM_FIT_SPLINE, PM_FIT_POLYNOMIAL, or PM_FIT_NONE 74 const pmReadout *bias); ///< A possibly NULL bias pmReadout which is to be subtracted 75 #endif 59 /// Subtract the overscan, bias and/or dark 60 /// 61 /// Subtracts the overscan, as measured from the bias member of the input readout (if options are non-NULL), 62 /// bias (if non-NULL) and dark (if non-NULL) scaled by the CELL.DARKTIME concept. 63 bool pmSubtractBias(pmReadout *in, ///< Input readout, to be overscan/bias/dark corrected 64 pmOverscanOptions *overscanOpts, ///< Options for overscan subtraction, or NULL 65 const pmReadout *bias, ///< Bias image to subtract, or NULL 66 const pmReadout *dark ///< Dark image to scale and subtract, or NULL 67 ); 76 68 77 69 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
