IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2024, 5:54:26 PM (2 years ago)
Author:
hgao
Message:

merge /branches/eam_branches/psModules.20240412

Location:
branches/2dbias/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2dbias/psModules

  • branches/2dbias/psModules/src/detrend/pmOverscan.h

    r42379 r42664  
    3535{
    3636    // 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)
    4037    pmFit fitType;                      ///< Type of fit to overscan
    4138    unsigned int order;                 ///< Order of polynomial, or number of spline pieces
     
    4340    int boxcar;                         ///< Boxcar smoothing radius
    4441    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).
     56typedef 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)
    4563    float minValid;                     ///< if overscan is too low, readout is dead : mask
    4664    float maxValid;                     ///< if overscan is too high, readout is dead : mask
    4765    psImageMaskType maskVal;            ///< Mask value to give dead readouts
    4866
    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;
    5470
    5571/// 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                                          );
     72pmOverscanOptions *pmOverscanOptionsAlloc(void);
     73
     74pmOverscanStatOptions *pmOverscanStatOptionsAlloc(void);
    6375
    6476psVector *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
    6879    );
    6980
    70 bool pmOverscanUpdateHeader (pmHDU *hdu, pmOverscanOptions *overscanOpts, float chi2);
     81// bool pmOverscanUpdateHeader (pmHDU *hdu, pmOverscanOptions *overscanOpts, float chi2);
    7182
    7283bool pmOverscanSubtract (pmReadout *input, pmOverscanOptions *overscanOpts);
Note: See TracChangeset for help on using the changeset viewer.