IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2034


Ignore:
Timestamp:
Oct 8, 2004, 2:35:09 PM (22 years ago)
Author:
Paul Price
Message:

Added pmReadoutCombine.

Location:
trunk/doc/modules
Files:
2 edited

Legend:

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

    r1999 r2034  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.2 2004-10-07 18:16:57 eugene Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.3 2004-10-09 00:35:02 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    1010\item added \code{pmFPAfromHeader}
    1111\end{itemize}
     12
     13\subsection{Changes from version 01 to version 02}
     14
     15\begin{itemize}
     16\item Added \code{pmReadoutCombine}
     17\end{itemize}
  • trunk/doc/modules/ModulesSDRS.tex

    r1997 r2034  
    1 %%% $Id: ModulesSDRS.tex,v 1.16 2004-10-07 18:15:06 eugene Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.17 2004-10-09 00:35:09 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    1010\project{Pan-STARRS Image Processing Pipeline}
    1111\organization{Institute for Astronomy}
    12 \version{01}
     12\version{02}
    1313\docnumber{PSDC-430-008}
    1414% note the use of the docnumber & version number:
     
    353353image), the function shall generate an error.
    354354
     355
     356
     357\section{Calibration}
     358
     359The calibration module essentially consists of combining multiple
     360images of a particular type in order to build up signal-to-noise.  For
     361this, we require a general purpose image combination module.  We
     362forsee this module as only acting upon data from the same detector,
     363and so each input image will have the same noise characteristics.
     364
     365\begin{verbatim}
     366typedef struct {
     367    psStats *stats;                     // Statistics to use in combining pixels
     368    unsigned int maskVal,               // Mask pixels where mask & maskVal == 1
     369    float fracHigh;                     // Fraction of high pixels to throw
     370    float fracLow;                      // Fraction of low pixels to throw
     371    int nKeep;                          // Number of pixels to be sure to keep
     372} pmCombineParams;
     373
     374psImage *
     375pmReadoutCombine(psImage *output,       // Output image, or NULL
     376                 const psList *inputs,  // List of input readouts
     377                 pmCombineParams *params, // Combination parameters
     378                 const psVector *zero,  // Offsets to apply for each image
     379                 const psVector *scale, // Scales to apply for each image
     380                 bool applyZeroScale,   // Are zero and scale for application, or only noise properties?
     381                 float gain,            // Gain in e/ADU
     382                 float readnoise        // Read noise in e
     383                 );
     384\end{verbatim}
     385
     386\code{pmReadoutCombine} combines input images pixel by pixel --- for
     387each pixel of the output image, a stack of contributing input pixels
     388is formed and combined.  Several of its input parameters are lists or
     389vectors, and if these are not all of the same length (or \code{NULL}),
     390the module shall generate an error and return \code{NULL}.
     391
     392If the provided \code{output} is \code{NULL}, then the module shall
     393allocate a new image of sufficient size for the input images.  If the
     394\code{output} image is non-\code{NULL} and is not of sufficient size
     395for the combined image, the module shall generate an error and return
     396\code{NULL}.
     397
     398If the \code{inputs} is \code{NULL}, the module shall generate an
     399error and return \code{NULL}.  Otherwise, the \code{inputs} shall be a
     400list of \code{psReadout}s.  The images contained within the
     401\code{psReadout}s need not all be of the same size, but the module
     402shall take into account the offsets (\code{col0,row0}) from the corner
     403of the detector when comparing pixels, so that it is the same
     404\textit{physical} pixels that are combined.
     405
     406The parameters used in the combination, including how the pixels are
     407to be combined, and how the rejection is performed is contained within
     408the \code{params}, which may not be \code{NULL} (otherwise the module
     409shall generate an error and return \code{NULL}).  We choose to use
     410this structure instead of supplying the values separately in order to
     411keep down the number of parameters to \code{pmReadoutCombine}; the
     412\code{psCombineParams} may be recycled for subsequent calls to
     413\code{pmReadoutCombine} since the values are not dependent upon the
     414choice of inputs, but merely specify how the combination is to be
     415performed.
     416
     417The particular statistic specified by \code{stats} shall be used to
     418combine each stack of pixels from the input images.  Only one of the
     419statistics choices may be specified, otherwise the module shall
     420generate an error and return \code{NULL}.
     421
     422If the \code{maskVal} is non-zero, then pixels in the \code{mask} of
     423each \code{psReadout} in the \code{inputs} which satisfy the
     424\code{maskVal} shall not have the corresponding pixels placed in the
     425stack for combination.
     426
     427After masking, but before performing the combination, the highest
     428\code{fracHigh} fraction and lowest \code{fracLow} fraction of pixels
     429in the stack are immediately rejected, unless this would leave less
     430than \code{nKeep} pixels in the stack, in which case no immediate
     431rejection is performed.
     432
     433If the \code{zero} vector is non-\code{NULL} and \code{applyZeroScale}
     434is \code{true}, then the appropriate values shall be added to the
     435\code{inputs} before combining.  In the event that the type of the
     436\code{psVector} is more precise than that of any of the \code{inputs},
     437the module shall generate a warning and truncate the sum to the
     438precision of the image.  If \code{zero} is non-\code{NULL} and
     439\code{applyZeroScale} is false, then the values shall only be used in
     440calculating the noise.
     441
     442If the \code{scale} vector is non-\code{NULL} and
     443\code{applyZeroScale} is \code{true}, then the appropriate values
     444shall multiply the \code{inputs} before combining.  In the event that
     445the type of the \code{psVector} is more precise than that of any of
     446the \code{inputs}, the module shall generate a warning and truncate
     447the multiplication to the precision of the image.  If \code{scale} is
     448non-\code{NULL} and \code{applyZeroScale} is false, then the values
     449shall only be used in calculating the noise.
     450
     451The purpose of \code{applyZeroScale} is to allow combination of fringe
     452frames, where the frames have been deliberately sky-subtracted and
     453rescaled (to get the fringes amplitudes running from -1 to 1), which
     454actions should not be undone when combining, but yet it is desirable
     455to provide the \code{zero} and \code{scale} values so that the correct
     456noise properties are used in the combination.
     457
     458If the \code{gain} and \code{readnoise} are positive and non-negative
     459(respectively), then these shall be used to provide weights for the
     460combination.
     461
     462
     463
    355464\section{Revision Change Log}
    356465\input{ChangeLogSDRS.tex}
     
    607716%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    608717
    609 
    610718\begin{verbatim}
    611719char *pmCameraFromHeader (psFitsHeader *header);
Note: See TracChangeset for help on using the changeset viewer.