IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1110


Ignore:
Timestamp:
Jun 25, 2004, 5:42:48 PM (22 years ago)
Author:
Paul Price
Message:

Fixing formats of code snippets.

File:
1 edited

Legend:

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

    r1104 r1110  
    1 %%% $Id: ModulesSDRS.tex,v 1.3 2004-06-26 00:34:15 price Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.4 2004-06-26 03:42:48 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    394394
    395395Given an input image and region to keep, \code{psPhase2Trim} shall
    396 trim the input image, leaving only the specified region.  The API
    397 shall be the following:
    398 \begin{verbatim}
    399 /** Trims the input image to remove the edges corrupted by OT shifting, and the overscan. */
    400 psReadout *psPhase2Trim(psReadout *in,  ///< Input image to be trimmed, and output
    401                         const psImageRegion *region ///< Region to keep
    402                         );
    403 \end{verbatim}
    404 
    405 Note that the trim shall be performed on the input image in-place.
     396trim the input image, \code{in}, leaving only the specified region,
     397\code{region}.  The API shall be the following:
     398\begin{verbatim}
     399psReadout *psPhase2Trim(psReadout *in, const psImageRegion *region);
     400\end{verbatim}
     401
     402Note that the trim shall be performed on the input image in-place, so
     403that the input image is modified.
    406404
    407405The offset of the input image (\code{in->x0} and \code{in->y0}) shall
     
    420418\subsection{Non-linearity}
    421419
    422 Given an input image, and the coefficients of a polynomial,
    423 \code{psPhase2CorrectNonLinearity} shall correct the input image for
    424 non-linearity by applying the polynomial to the flux of each pixel.
     420We shall specify two functions to perform the non-linearity
     421correction, in order to implement the possible methods of specifying
     422the correction.
     423
     424The first, \code{psPhase2NonLinearityPolynomial} shall correct the
     425input image for non-linearity by applying the given polynomial,
     426\code{coeff}, to the flux of each pixel in the input image, \code{in}.
    425427The API shall be the following:
     428
    426429\begin{verbatim}
    427430/** Applies the correction for detector non-linearity. */
    428 psReadout *psPhase2CorrectNonLinearity(psReadout *in, ///< Input image to be corrected, and output
    429                                        const psPolynomial1D *coeff ///< Polynomial with which to correct
    430                                        );
     431psReadout *psPhase2CorrectNonLinearity(psReadout *in, const psPolynomial1D *coeff);
    431432\end{verbatim}
    432433
     
    434435caller, likely from the image metadata.
    435436
     437The second function, \code{psPhase2NonLinearityLookup} shall correct
     438the input image for non-linearity by using a lookup table.  The API
     439shall be the following:
     440
     441\begin{verbatim}
     442psReadout *psPhase2NonLinearityLookup(psReadout *in, const psVector *inFlux, const psVector *outFlux);
     443\end{verbatim}
     444
     445For each pixel in the input image, the function shall find the flux
     446value in the \code{inFlux} vector, and replace the flux with the
     447corresponding value in the \code{outFlux} vector.  If the sizes of the
     448\code{inFlux} and \code{outFlux} vectors differ, then the function
     449shall generate a warning, and the longer vector shall be truncated to
     450the length of the shorter.  The \code{inFlux} vector may be assumed
     451to be pre-sorted.
     452
     453Both \code{psPhase2NonLinearityPolynomial} and
     454\code{psPhase2NonLinearityLookup} shall modify the input image
     455in-place.
     456
    436457\subsection{Flat-fielding}
    437458
    438459Given an input image and a flat-field image, \code{psPhase2FlatField}
    439 shall divide the input image by the flat-field image.  The API shall be the following:
    440 \begin{verbatim}
    441 /** Flat-fields the image. */
    442 psReadout *psPhase2FlatField(psReadout *in, ///< Input image to be flat-fielded, and output
    443                              const psImage *flat ///< Flat-field image
    444                              );
     460shall divide the input image by the flat-field image.  The API shall
     461be the following:
     462\begin{verbatim}
     463psReadout *psPhase2FlatField(psReadout *in, const psImage *flat);
    445464\end{verbatim}
    446465
     
    456475
    457476Pixels which are negative or zero in the \code{flat} shall be masked
    458 in the input image.
     477in the input image with the value \code{PS_MASK_FLAT} (see
     478\S\ref{sec:maskValues}).
    459479
    460480The function shall not normalise the \code{flat}; this responsibility
    461 is left to the caller.
     481is left to the caller.  This function is basically equivalent to a
     482divide, but with care for the region that is divided.
    462483
    463484\subsection{Subtract sky}
     
    484505\end{verbatim}
    485506
    486 Note that the input image shall be subtracted in-place.  The function
    487 shall return the subtracted image, and also update the polynomial,
     507The polynomial specification, \code{poly}, specifies the order of the
     508polynomial to be used in fitting the background.  Note that the input
     509image, \code{in}, shall be subtracted in-place.  The function shall
     510return the subtracted image, and also update the polynomial,
    488511\code{poly}, to hold the polynomial coefficients used in the
    489512subtraction, and update the vector \code{outNorms} to hold the
     
    491514subtraction.  The \code{outNorms} vector shall be resized if necessary
    492515to match the number of template sky images in the list
    493 \code{skyImages}.
     516\code{skyImages}.  If the polynomial specification is \code{NULL}, then
     517no polynomial shall be fit to the input image.
    494518
    495519Note that the input image, \code{in}, and the template sky images,
     
    503527function shall generate an error.
    504528
    505 If the size of a source in the \code{catalog} is \code{size}, then the
    506 radius to mask around the source before fitting the background shall
    507 be \code{radiusMultiply} $\times$ \code{size} + \code{radiusAdd}.
     529The \code{catalog} shall be a linked list of \code{psObject} which
     530corresponds to objects on the input image.  If the size of a source in
     531the \code{catalog} is \code{size}, then the radius to mask around the
     532source before fitting the background shall be \code{radiusMultiply}
     533$\times$ \code{size} + \code{radiusAdd}.
    508534
    509535\tbd{Are the catalog stars in celestial or pixel coordinates?  I lean
    510536to pixel coordinates.}
     537
     538\tbd{What size do we use?  FWHM?}
    511539
    512540When fitting a polynomial, the function shall bin the input image by
     
    529557The following modules mask various defects on an image.
    530558
     559\subsection{Mask values}
     560\label{sec:maskValues}
     561
     562We define several mask values for use in the phase 2 processing:
     563\begin{verbatim}
     564/** Mask values */
     565typedef enum {
     566    PS_MASK_TRAP,                       // The pixel is a charge trap
     567    PS_MASK_BADCOL,                     // The pixel is a bad column
     568    PS_MASK_SAT,                        // The pixel is saturated
     569    PS_MASK_FLAT,                       // The pixel is non-positive in the flat-field
     570    PS_MASK_CR_MORPH                    // The pixel is determined to be a cosmic ray, based on its morphology
     571} psMaskValue;
     572\end{verbatim}
     573
     574Of these, masks for the charge traps need to be grown by the
     575extent of the OT convolution kernel.  For other pixel types,
     576orthogonal transfer of the flux in this pixel will not (necessarily)
     577affect the flux in neighbouring pixels
     578
    531579\subsection{Bad pixels}
    532580
Note: See TracChangeset for help on using the changeset viewer.