IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1467


Ignore:
Timestamp:
Aug 10, 2004, 4:48:44 PM (22 years ago)
Author:
Paul Price
Message:

Cleaning up after comments from Gene.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/modules/ModulesSDRS.tex

    r1450 r1467  
    1 %%% $Id: ModulesSDRS.tex,v 1.12 2004-08-10 02:00:00 price Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.13 2004-08-11 02:48:44 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    105105\end{verbatim}
    106106
     107Two types of bias correction may optionally be performed on the input
     108image, \code{in}.  The first is the subtraction of an overscan.
     109Multiple overscan regions may be specified and fit as a function of
     110row (or column).  The second is the subtraction of a full-frame bias
     111image (or a ``dark'' image).
     112
    107113The input image, \code{in}, shall have the bias subtracted in-place.
    108114
    109115The type of the overscan fit function, \code{fitSpec}, shall be
    110116dependent upon the value of \code{fit}, which specifies the type of
    111 fit to be employed.  \code{fit} is an enumerated type:
    112 
    113 \begin{verbatim}
    114 /** Fit types */
    115 typedef enum {
    116     PM_FIT_NONE,                        ///< No fit
    117     PM_FIT_POLYNOMIAL,                  ///< Fit polynomial
    118     PM_FIT_SPLINE                       ///< Fit cubic splines
    119 } pmFit;
    120 \end{verbatim}
    121 
    122 If \code{fitSpec} is \code{NULL}, or \code{fit} is \code{PM_FIT_NONE},
    123 then no fit shall be performed to the overscan.  Otherwise,
    124 \code{fitSpec} shall be interpreted to be a structure of the
    125 appropriate type (\code{psPolynomial1D} for \code{PM_FIT_POLYNOMIAL},
    126 and \code{psSpline1D} for \code{PM_FIT_SPLINE}), and the overscan
    127 shall (after reduction of the vector and binning) be fit using the
    128 specified functional form.  Upon return, the \code{fitSpec} shall
    129 contain the coefficients of the overscan fit.
     117fit to be employed and is described below.
    130118
    131119The prescan and/or overscan regions to be used are specified in
    132120\code{overscans}, which is a linked list of subimages.  In cases where
    133121\code{overscans} is \code{NULL} and \code{overscanAxis} is not
    134 \code{PM_OVERSCAN_NONE}, or if \code{overscans} is non-\code{NULL} and
    135 \code{overscanAxis} is \code{PM_OVERSCAN_NONE}, then the function
    136 shall generate a warning, no overscan subtraction shall be performed,
    137 and the function shall proceed to the full-frame bias subtraction.
     122\code{PM_OVERSCAN_NONE}, the function shall generate an error.  If
     123\code{overscans} is non-\code{NULL} and \code{overscanAxis} is
     124\code{PM_OVERSCAN_NONE}, then the function shall generate a warning,
     125no overscan subtraction shall be performed, and the function shall
     126proceed to the full-frame bias subtraction.
    138127
    139128The \code{overscanAxis} specifies how the prescan/overscan subtraction
     
    174163\code{PS_STAT_ROBUST_MODE}.
    175164
    176 If \code{nBin} is positive and less than the dimension of the vector,
    177 then the vector shall subsequently be binned into \code{nBin} bins,
    178 again using the specified statistic (\code{stat}).
     165If \code{nBin} is positive and less than the size of the vector, then
     166the vector shall subsequently be binned into bins that are a relative
     167size of \code{nBin} compared to the original pixels, again using the
     168specified statistic (\code{stat}).
     169
     170\code{fit} is an enumerated type:
     171\begin{verbatim}
     172/** Fit types */
     173typedef enum {
     174    PM_FIT_NONE,                        ///< No fit
     175    PM_FIT_POLYNOMIAL,                  ///< Fit polynomial
     176    PM_FIT_SPLINE                       ///< Fit cubic splines
     177} pmFit;
     178\end{verbatim}
     179
     180If \code{fitSpec} is \code{NULL}, or \code{fit} is \code{PM_FIT_NONE},
     181then no fit shall be performed to the overscan.  Otherwise,
     182\code{fitSpec} shall be interpreted to be a structure of the
     183appropriate type (\code{psPolynomial1D} for \code{PM_FIT_POLYNOMIAL},
     184and \code{psSpline1D} for \code{PM_FIT_SPLINE}), and the overscan
     185shall (after reduction of the vector and binning) be fit using the
     186specified functional form.  Upon return, the \code{fitSpec} shall
     187contain the coefficients of the overscan fit.
    179188
    180189If the overscan is not defined for each row/column, then the function
     
    184193
    185194Following any binning, the vector shall be fit by the functional form
    186 specified by \code{fit} (see above).  Then the overscan shall be
    187 subtracted from the image, using values from the fit if \code{fit} is
    188 not \code{PM_FIT_NONE}; otherwise using values from the overscan vector
    189 if \code{overscanAxis} is not \code{PM_OVERSCAN_ALL}; otherwise using
    190 the appropriate statistic applied to all the prescan/overscan pixels.
     195specified by \code{fit}.  Then the overscan shall be subtracted from
     196the image, using values from the fit if \code{fit} is not
     197\code{PM_FIT_NONE}; otherwise using values from the overscan vector if
     198\code{overscanAxis} is not \code{PM_OVERSCAN_ALL}; otherwise using the
     199appropriate statistic applied to all the prescan/overscan pixels.
    191200
    192201A bias (or dark) image shall be subtracted pixel-by-pixel from the
     
    234243shall generate a warning, and the longer vector shall be truncated to
    235244the length of the shorter.  The \code{inFlux} vector may be assumed
    236 to be pre-sorted.
     245to be pre-sorted and not contain duplicate values.
    237246
    238247If the particular value of a pixel is not found in the \code{inFlux}
     
    241250values specified in the \code{inFlux} vector, then the function shall
    242251generate a warning (at most one warning of this type per call,
    243 preferably mentioning the number of pixels out of bounds).
     252preferably mentioning the number of pixels out of bounds), and replace
     253that pixel value with the \code{outFlux} value corresponding to the
     254minimum or the maximum, depending on whether the pixel value is below
     255or above the range of \code{inFlux} values.
    244256
    245257In the event that the \code{inFlux} vector does not contain two or
     
    294306/** Mask values */
    295307typedef enum {
    296     PM_MASK_TRAP,                       ///< The pixel is a charge trap
    297     PM_MASK_BADCOL,                     ///< The pixel is a bad column
    298     PM_MASK_SAT,                        ///< The pixel is saturated
    299     PM_MASK_FLAT                        ///< The pixel is non-positive in the flat-field
     308    PM_MASK_TRAP       = 0x0001,        ///< The pixel is a charge trap
     309    PM_MASK_BADCOL     = 0x0002,        ///< The pixel is a bad column
     310    PM_MASK_SAT        = 0x0004,        ///< The pixel is saturated
     311    PM_MASK_FLAT       = 0x0008,        ///< The pixel is non-positive in the flat-field
    300312} pmMaskValue;
    301313\end{verbatim}
     
    315327shall be the following:
    316328\begin{verbatim}
    317 psReadout *pmMaskBadPixels(psReadout *in, const psImage *mask, int maskVal, float sat, int grow);
     329psReadout *pmMaskBadPixels(psReadout *in, const psImage *mask, unsigned int maskVal,
     330                           float sat, unsigned int growVal, int grow);
    318331\end{verbatim}
    319332
    320333Note that the input image, \code{in}, is modified in-place.  All
    321334pixels in the \code{mask} which satisfy the \code{maskVal} shall have
    322 their corresponding pixels in the input image, \code{in}, along with
    323 all pixels within the \code{grow} radius masked.  Pixels which have
    324 flux greater than \code{sat} shall also be masked, but not grown.
     335their corresponding pixels masked in the input image, \code{in}.  All
     336pixels which satisfy the \code{growVal} shall have their corresponding
     337pixels, along with all pixels within the \code{grow} radius masked.
     338Pixels which have flux greater than \code{sat} shall also be masked,
     339but not grown.
    325340
    326341Note that the input image, \code{in}, and the \code{mask} need not be
Note: See TracChangeset for help on using the changeset viewer.