IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 28, 2004, 3:44:33 PM (22 years ago)
Author:
Paul Price
Message:

Hacked sky subtraction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/modules/include/phase2.h

    r1105 r1113  
    108108} psOverscanAxis;
    109109
    110 /** Fit type for bias */
     110/** Fit types */
    111111typedef enum {
    112     PS_OVERSCAN_FIT_NONE,               ///< No fit to bias
    113     PS_OVERSCAN_FIT_LINEAR,             ///< Do linear interpolation on bias
    114     PS_OVERSCAN_FIT_POLYNOMIAL,         ///< Fit polynomial to bias
    115     PS_OVERSCAN_FIT_CHEBYSHEV,          ///< Fit chebyshev to bias
    116     PS_OVERSCAN_FIT_SPLINE              ///< Fit cubic splines to bias
    117 } psBiasFit;
     112    PS_FIT_NONE,                        ///< No fit
     113    PS_FIT_LINEAR,                      ///< Do linear interpolation
     114    PS_FIT_POLYNOMIAL,                  ///< Fit polynomial
     115    PS_FIT_CHEBYSHEV,                   ///< Fit chebyshev
     116    PS_FIT_SPLINE                       ///< Fit cubic splines
     117} psFit;
    118118
    119119/** Subtracts an overscan and bias from the input image. */
     
    122122                                               ///< Also outputted
    123123                                psOverscanAxis overscanAxis, ///< Overscan axis
    124                                 psBiasFit fit, ///< How to fit the bias
     124                                psFit fit, ///< How to fit the bias
    125125                                int nBin, ///< Number of bins for overscan vector before fitting
    126126                                const psList *regions, ///< Linked list of psImageRegion types.
     
    139139
    140140
    141 /** Applies the correction for detector non-linearity.  Non-linearity coefficients are determined from the
    142  *  image metadata.
     141/** Applies the correction for detector non-linearity.  Non-linearity coefficients are provided by the caller.
     142 *  Two functions: one to do via a polynomial, the other via a lookup table.
    143143 */
    144 psReadout *psPhase2CorrectNonLinearity(psReadout *in, ///< Input image to be corrected, and output
    145                                        const psPolynomial1D *coeff ///< Polynomial with which to correct
    146                                        );
     144psReadout *psPhase2NonLinearityPolynomial(psReadout *in, ///< Input image to be corrected, and output
     145                                          const psPolynomial1D *coeff ///< Polynomial with which to correct
     146                                          );
     147
     148psReadout *psPhase2NonLinearityLookup(psReadout *in, ///< Input image to be corrected, and output
     149                                      const psVector *inFlux, ///< Input flux values
     150                                      const psVector *outFlux ///< Output flux values
     151                                      );
    147152
    148153/** Flat-fields the image. */
     
    151156                             );
    152157
    153 /** Subtracts the sky background. */
     158/** Simple sky subtraction */
    154159psReadout *psPhase2SubtractSky(psReadout *in, ///< Input image to be sky-subtracted, and output
    155                                psPolynomial2D *poly, ///< Polynomial specification, returns coeffcients
    156                                psVector *outNorms, ///< Normalisations of the template sky images: output
    157                                const psList *skyImages, ///< Template sky images: a list of type psImage, or
    158                                                         ///< NULL
    159                                const psList *catalog, ///< Sources nearby to mask when measuring the
    160                                                       ///< background: a list of type psObject, or NULL
    161                                float radiusMultiply, ///< Multiplying factor of object radius for mask
    162                                float radiusAdd, ///< Additive factor to grow the object masks
    163                                int binFactor ///< Binning factor to use on image before solving for polynomial
     160                               void *fitSpec, ///< Polynomial/Spline specification, returns coeffcients
     161                               psFit fit, ///< Fit type
     162                               int binFactor, ///< Binning factor to use on image before solving for polynomial
     163                               psStats *stats, ///< Statistics to use in binning
     164                               float clipSD ///< Standard deviations to clip at after binning.
    164165                               );
    165166
     
    168169/* Masking */
    169170
     171/** Mask values */
     172typedef enum {
     173    PS_MASK_TRAP,                       ///< The pixel is a charge trap
     174    PS_MASK_BADCOL,                     ///< The pixel is a bad column
     175    PS_MASK_SAT,                        ///< The pixel is saturated
     176    PS_MASK_FLAT,                       ///< The pixel is non-positive in the flat-field
     177    PS_MASK_CR_MORPH                    ///< The pixel is determined to be a cosmic ray, from morphology
     178} psMaskValue;
     179
    170180/** Returns an image that has the bad pixels masked.  Also masks saturated pixels */
    171 psReadout *psPhase2MaskBadPixels(psReadout *in ///< Image to be masked, and output
     181psReadout *psPhase2MaskBadPixels(psReadout *in, ///< Image to be masked, and output
    172182                                 const psImage *mask, ///< Bad pixel mask to apply
    173183                                 int maskVal, ///< Mask the pixels for which mask & maskVal > 0.
Note: See TracChangeset for help on using the changeset viewer.