IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 28, 2004, 4:23:47 PM (22 years ago)
Author:
Paul Price
Message:

Cleaning up.

File:
1 edited

Legend:

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

    r1113 r1117  
    1 %%% $Id: ModulesSDRS.tex,v 1.5 2004-06-29 01:44:23 price Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.6 2004-06-29 02:23:47 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    7676\item Subtract the background;
    7777\item Mask bad pixels;
    78 \item Mask cosmic rays;
     78\item \tbd{Mask cosmic rays;}
    7979\item \tbd{Mask optical defects;}
    8080\item \tbd{Measure the PSF;}
     
    8585
    8686Each of these shall be discussed in turn, below.  Those modules which
    87 are \tbd{TBD} will be deferred until they may be properly defined.
     87are \tbd{TBD} will be deferred until they may be properly defined,
     88some of which requires further research to define the best algorithm.
    8889
    8990These modules are built on top of, and are dependent upon, the \PS{}
     
    121122\end{verbatim}
    122123
    123 The \code{kernel} member shall point to an image that contains the
    124 kernel values.  The kernel has both positive and negative indices to
    125 convey the positive and negative shifts.  The maximum extent of these
    126 shifts shall be defined by the \code{xMin}, \code{xMax}, \code{yMin}
    127 and \code{yMax} members.  Note that \code{xMin} and \code{yMin}, under
    128 normal circumstances, should be negative numbers.  That is,
    129 \code{myKernel->kernel[-3][-2]} may be defined if \code{yMin} and
    130 \code{xMin} are equal to or more negative than -3 and -2,
    131 respectively.
     124The \code{kernel} shall contain the kernel values.  The kernel has
     125both positive and negative indices to convey the positive and negative
     126shifts.  The maximum extent of these shifts shall be defined by the
     127\code{xMin}, \code{xMax}, \code{yMin} and \code{yMax} members.  Note
     128that \code{xMin} and \code{yMin}, under normal circumstances, should
     129be negative numbers.  That is, \code{myKernel->kernel[-3][-2]} may be
     130defined if \code{yMin} and \code{xMin} are equal to or more negative
     131than -3 and -2, respectively.
    132132
    133133Of course, we require the appropriate constructor and destructor:
     
    137137\end{verbatim}
    138138
     139\code{psKernelAlloc} shall allocate a kernel.  In the event that one
     140of the minimum values is greater than the corresponding maximum value,
     141the function shall generate a warning, and the offending values shall
     142be exchanged.
    139143
    140144\subsection{Calculate the convolution kernel}
    141145
    142146Given a list of pixel shifts made in the course of OT guiding,
    143 \code{psPhase2GetKernel} shall return the kernel.  The API shall be
    144 the following:
     147\code{psPhase2GetKernel} shall return the appropriate kernel.  The API
     148shall be the following:
    145149\begin{verbatim}
    146150psKernel *psPhase2GetKernel(const psVector *xShifts, const psVector *yShifts);
     
    150154by the user, most probably from the FITS file containing the image.
    151155
    152 The elements of the shift vectors should be of an integer type,
     156The elements of the shift vectors should be of an integer type;
    153157otherwise the values shall be truncated to integers.  The output
    154158kernel shall be normalised such that the sum over the kernel is unity.
     
    185189\subsection{PSLib Routines}
    186190
    187 \code{psKernel} and \code{psImageConvolve} shall be part of the \PS{}
    188 Library, \code{PSLib}, so that they may be re-used for other modules.
     191\code{psKernel} and \code{psImageConvolve} shall be incorporated into
     192the \PS{} Library, \code{PSLib}, so that they may be re-used for other
     193modules.
    189194
    190195%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    215220We also require a corresponding constructor and destructor:
    216221\begin{verbatim}
    217 /** Constructor */
    218 psImageRegion *psImageRegionAlloc(int x0, ///< x offset to region
    219                                   int y0, ///< y offset to region
    220                                   int nX, ///< Size of region in x
    221                                   int nY ///< Size of region in y
    222                                   );
    223 /** Destructor */
    224 void psImageRegionFree(psImageRegion *reg ///< Region to destroy
    225                        );
     222psImageRegion *psImageRegionAlloc(int x0, int y0, int nX, int nY);
     223void psImageRegionFree(psImageRegion *reg);
    226224\end{verbatim}
    227225
     
    234232but we neglected to define them for PSLib.  We now define
    235233one-dimensional cubic splines, \code{psSpline1D}, which shall be
    236 included into PSLib:
     234incorporated into PSLib:
    237235
    238236\begin{verbatim}
     
    261259Of course, we require the appropriate constructors and destructor:
    262260\begin{verbatim}
    263 /** Constructors */
    264261psSpline1D *psSpline1DAlloc(int n, float min, float max);
    265262psSpline1D *psSpline1DAllocGeneric(const psVector *bounds);
     
    286283
    287284\begin{verbatim}
    288 /** Evaluator */
    289 float psSpline1DEval(const psSpline1D *spline, ///< Spline to evaluate
    290                      float x    ///< Normalised (-1,1) coordinates at which to evaluate
    291                      );
     285float psSpline1DEval(const psSpline1D *spline, float x);
    292286\end{verbatim}
    293287
     
    409403the bounds of the input image.
    410404
     405\subsection{PSLib}
     406
     407The \code{psSpline1D} and \code{psFit} shall be incorporated into
     408PSLib.
     409
     410
    411411%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    412412
     
    484484\subsection{Subtract sky}
    485485
    486 \tbd{This is a simply sky subtraction routine.  A more complicated
     486\tbd{This is a simple sky subtraction routine.  A more complicated
    487487routine will be specified in the future, following research into the
    488488best algorithm.}
     
    494494the following:
    495495\begin{verbatim}
    496 /** Simple sky subtraction */
    497 psReadout *psPhase2SubtractSky(psReadout *in, ///< Input image to be sky-subtracted, and output
    498                                void *fitSpec, ///< Polynomial/Spline specification, returns coeffcients
    499                                psFit fit, ///< Fit type
    500                                int binFactor, ///< Binning factor to use on image before solving for polynomial
    501                                psStats *stats, ///< Statistics to use in binning
    502                                float clipSD ///< Standard deviations to clip at after binning.
    503                                );
     496psReadout *psPhase2SubtractSky(psReadout *in, void *fitSpec, psFit fit, int binFactor, psStats *stats,
     497                               float clipSD);
    504498\end{verbatim}
    505499
     
    514508spline on the basis of \code{fit} (in the same manner as for bias
    515509subtraction; \S\ref{sec:bias}).  If \code{fitSpec} is \code{NULL} or
    516 \code{fit} is \code{PS_FIT_NONE}, then no fit shall be performed, and
    517 the function shall simply return.
     510\code{fit} is \code{PS_FIT_NONE} or \code{PS_FIT_LINEAR}, then no fit
     511shall be performed, and the function shall simply return.
    518512
    519513When fitting the polynomial, the function shall first bin the input
     
    534528Binned pixels deviating more than \code{clipSD} standard deviations
    535529from the mean of the binned pixels shall be clipped in a single
    536 clipping iteration.  If the \code{clipSD} is non-positive, then the
    537 function shall generate a warning and not perform any clipping.
     530clipping iteration before polynomial fitting.  If the \code{clipSD} is
     531non-positive, then the function shall generate a warning and not
     532perform any clipping.
    538533
    539534
     
    566561\subsection{Bad pixels}
    567562
    568 Given an input image, a bad pixel mask, a corresponding value in the
    569 bad pixel mask to mask in the input image, a saturation level, and a
    570 growing radius, \code{psPhase2MaskBadPixels} shall mask in the input
    571 image those pixels in the bad pixel mask that match the value to mask.
    572 The API shall be the following:
     563Given an input image, \code{in}, a bad pixel \code{mask}, a
     564corresponding value in the bad pixel mask to mask in the input image,
     565\code{maskVal}, a saturation level, and a growing radius,
     566\code{psPhase2MaskBadPixels} shall mask in the input image those
     567pixels in the bad pixel mask that match the value to mask.  The API
     568shall be the following:
    573569\begin{verbatim}
    574570/** Returns an image that has the bad pixels masked.  Also masks saturated pixels */
     
    582578
    583579Note that the input image, \code{in}, is modified in-place.  All
    584 pixels in the \code{mask} which satisfy the \code{maskVal} or have
    585 corresponding flux greater than \code{sat}, shall have their
    586 corresponding pixels in the input image, \code{in}, along with all
    587 pixels within the \code{grow} radius masked.
     580pixels in the \code{mask} which satisfy the \code{maskVal} shall have
     581their corresponding pixels in the input image, \code{in}, along with
     582all pixels within the \code{grow} radius masked.  Pixels which have
     583flux greater than \code{sat} shall also be masked, but not grown.
     584
     585
     586%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     587
     588
     589
     590%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     591\bibliographystyle{plain}
     592\bibliography{panstarrs}
     593
     594\end{document}
    588595
    589596\subsection{Cosmic rays}
     
    624631optical model of the camera.  Put this one on the backburner?}
    625632
    626 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    627633
    628634\section{Objects}
     
    732738not all of which may correspond to legal positions on the input chip,
    733739\code{in}.
    734 
    735 
    736 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    737 \bibliographystyle{plain}
    738 \bibliography{panstarrs}
    739 
    740 \end{document}
    741 
Note: See TracChangeset for help on using the changeset viewer.