IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4757


Ignore:
Timestamp:
Aug 10, 2005, 5:05:26 PM (21 years ago)
Author:
Paul Price
Message:

Added DB function, changed pmNonLinearityLookup to read a psLookupTable, changed pmMaskBapdPixels input types, added pmFPAWriteMask, changed grow spec for pmMaskBadPixels, added section on Paper Trail

Location:
trunk/doc/modules
Files:
3 edited

Legend:

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

    r4720 r4757  
    108108
    109109A readout is the result of a single read of a cell (or a portion
    110 thereof).  It contains the offset from the lower-left corner of
    111 the chip, in the case that the CCD was windowed, as well as the
    112 binning factors and parity (if the binning value is negative, then
    113 the parity is reversed).  It also contains the pixel data, metadata
    114 containers for the concepts and analysis, and a link to the parent.
     110thereof).  It contains the offset from the lower-left corner of the
     111chip, in the case that the CCD was windowed, as well as the binning
     112factors and parity (if the binning value is negative, then the parity
     113is reversed).  It also contains the pixel data (with corresponding
     114mask), metadata containers for the concepts and analysis, and a link
     115to the parent.
    115116
    116117\begin{verbatim}
     
    123124    // Information
    124125    psImage *image;                    // Imaging area of readout
     126    psImage *mask;                     // Mask for image
    125127    psList *bias;                      // List of bias section (sub-)images
    126128    psMetadata *analysis;              // Readout-level analysis metadata
     
    398400have \code{valid} set to \code{true}.
    399401
    400 \begin{datatype}
    401 typedef enum {
    402     PM_FPA_MORPH_LEFTRIGHT,
    403     PM_FPA_MORPH_IMAGEBIAS
    404 } pmFPAMorphOption;
    405 \end{datatype}
    406 
    407402\begin{prototype}
    408403bool pmFPAMorph(pmFPA *toFPA, pmFPA *fromFPA, bool positionDependent, int chipNum, int cellNum);
     
    439434information with which to write the FITS images.
    440435
     436\begin{prototype}
     437pmFPAWriteMask(psFits *fits, pmFPA *fpa);
     438\end{prototype}
     439
     440\code{pmFPAWriteMask} is very similar to \code{pmFPAWrite}, but it
     441shall write the \code{mask} elements of the \code{pmReadout}s
     442comprinsing the \code{fpa}.
     443
    441444%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    442445
  • trunk/doc/modules/ChangeLogSDRS.tex

    r4710 r4757  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.28 2005-08-05 03:43:30 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.29 2005-08-11 03:05:26 price Exp $
    22
    33\subsection{Changes from version 00 (16 August 2004) to version 01 (12 October 2004)}
     
    9595\item \code{pmConfigRead} shall call \code{psTimeInitialize}, \code{psLogSetLevel},
    9696  \code{psLogSetFormat}, \code{psTraceSetLevel}.
     97\item Added \code{pmConfigDB}.
     98\item Changed \code{pmNonLinearityLookup} to read a \code{psLookupTable}.
     99\item Changed input types for \code{pmMaskBadPixels}.
     100\item Added \code{pmFPAWriteMask}.
     101\item \code{pmMaskBadPixels} shall grow the mask for saturated by 1, in addition
     102  to the explicit grow.
     103\item Added section on ``Paper Trail'' to Phase 2 functions.
    97104\end{itemize}
  • trunk/doc/modules/ModulesSDRS.tex

    r4710 r4757  
    1 %%% $Id: ModulesSDRS.tex,v 1.52 2005-08-05 03:43:30 price Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.53 2005-08-11 03:05:26 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    655655recipes contained in the \code{camera} configuration (details below).
    656656
    657 We also specify an additional function:
    658657\begin{prototype}
    659658bool pmConfigValidateCamera(psMetadata *camera, psMetadata *header);
     
    664663the \code{camera} configuration (see \S\ref{sec:camerarule});
    665664otherwise it shall return \code{false}.
     665
     666\begin{prototype}
     667psDB *pmConfigDB(psMetadata *site);
     668\end{prototype}
     669
     670\code{pmConfigDB} shall use the \code{site} configuration data to open
     671a database handle.  \tbd{This is fairly straightforward at the moment,
     672but will change when we beef up security.}
    666673
    667674\subsubsection{Example usage}
     
    870877pmReadout *pmSubtractBias(pmReadout *in, void *fitSpec, const psList *overscans,
    871878                          pmOverscanAxis overscanAxis, const psStats *stat,
    872                           int nBin, pmFit fit, const pmReadout *bias);
    873 \end{prototype}
    874 
    875 Two types of bias correction may optionally be performed on the input
    876 image, \code{in}.  The first is the subtraction of an overscan.
     879                          int nBin, pmFit fit, const pmReadout *bias,
     880                          const pmReadout *dark);
     881\end{prototype}
     882
     883Three types of bias correction may optionally be performed on the
     884input image, \code{in}.  The first is the subtraction of an overscan.
    877885Multiple overscan regions may be specified and fit as a function of
    878886row (or column).  The second is the subtraction of a full-frame bias
    879 image (or a ``dark'' image).
     887image.  The third is the subtraction of a suitably scaled full-frame
     888dark image.
    880889
    881890The input image, \code{in}, shall have the bias subtracted in-place.
     
    973982appropriate statistic applied to all the prescan/overscan pixels.
    974983
    975 A bias (or dark) image shall be subtracted pixel-by-pixel from the
    976 input image if \code{bias} is non-NULL.  Note that the input image,
    977 \code{in}, and the \code{bias} image need not be the same size, but
    978 the function shall use the offsets in the image (\code{in->x0} and
    979 \code{in->y0}) to determine the appropriate offsets to obtain the
    980 correct pixel on the \code{bias}.  In the event that the \code{bias}
    981 image is too small (i.e., pixels on the input image refer to pixels
    982 outside the range of the \code{bias} image), the function shall
    983 generate an error.  Any pixels masked in the \code{bias} shall also be
    984 masked in the output.  The bias image must be of the same type as the
    985 input image.
     984A bias image shall be subtracted pixel-by-pixel from the input image
     985if \code{bias} is non-NULL.  A dark image, multiplied by the
     986\code{darkTime}, shall be subtracted pixel-by-pixel from the input
     987image if \code{dark} is non-NULL.  Note that the input image,
     988\code{in}, and the \code{bias} and \code{dark} frames need not be the
     989same size, but the function shall use the offsets in the image
     990(\code{in->x0} and \code{in->y0}) to determine the appropriate offsets
     991to obtain the correct pixel on the \code{bias}.  In the event that the
     992\code{bias} image is too small (i.e., pixels on the input image refer
     993to pixels outside the range of the \code{bias} image), the function
     994shall generate an error.  Any pixels masked in the \code{bias} or
     995\code{dark} shall also be masked in the output.  The bias and dark
     996images may be copied to the same type as the input image if required.
    986997
    987998%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    10091020
    10101021\begin{prototype}
    1011 pmReadout *pmNonLinearityLookup(pmReadout *in, const psVector *inFlux, const psVector *outFlux);
    1012 \end{prototype}
    1013 
    1014 For each pixel in the input image, the function shall find the flux
    1015 value in the \code{inFlux} vector, and replace the flux with the
    1016 corresponding value in the \code{outFlux} vector.  If the sizes of the
    1017 \code{inFlux} and \code{outFlux} vectors differ, then the function
    1018 shall generate a warning, and the longer vector shall be truncated to
    1019 the length of the shorter.  The \code{inFlux} vector may be assumed
    1020 to be pre-sorted and not contain duplicate values.
    1021 
    1022 If the particular value of a pixel is not found in the \code{inFlux}
    1023 vector, the corresponding \code{outFlux} shall be calculated through
    1024 linear interpolation.  If the value of a pixel is beyond the range of
    1025 values specified in the \code{inFlux} vector, then the function shall
    1026 generate a warning (at most one warning of this type per call,
    1027 preferably mentioning the number of pixels out of bounds), and replace
    1028 that pixel value with the \code{outFlux} value corresponding to the
    1029 minimum or the maximum, depending on whether the pixel value is below
    1030 or above the range of \code{inFlux} values.
    1031 
    1032 In the event that the \code{inFlux} vector does not contain two or
    1033 more entries (being the lower limit required for linear
    1034 interpolation), then the function shall generate a warning, and make
    1035 no correction to any of the pixels.
     1022pmReadout *pmNonLinearityLookup(pmReadout *in, const char *filename);
     1023\end{prototype}
     1024
     1025For each pixel in the input image, the function shall replace the flux
     1026with the corresponding value from the supplied lookup table, specified
     1027by the \code{filename}.  The lookup table file shall consist of two
     1028columns of data, the first being the original flux value and the
     1029second being the replaced flux value.  The file shall be in a format
     1030suitable for reading by \code{psLookupTableRead}.
    10361031
    10371032Both \code{pmNonLinearityPolynomial} and \code{pmNonLinearityLookup}
     
    11101105shall be the following:
    11111106\begin{prototype}
    1112 pmReadout *pmMaskBadPixels(pmReadout *in, const psImage *mask, unsigned int maskVal,
     1107pmReadout *pmMaskBadPixels(pmReadout *in, const pmReadout *mask, unsigned int maskVal,
    11131108                           float sat, unsigned int growVal, int grow);
    11141109\end{prototype}
     
    11201115pixels, along with all pixels within the \code{grow} radius masked.
    11211116Pixels which have flux greater than \code{sat} shall also be masked,
    1122 but not grown.
     1117and grown by a single pixel (in addition to the \code{grow} done on
     1118the \code{growVal}).
     1119
     1120\tbd{In the future, may change grow to a convolution kernel}.
    11231121
    11241122Note that the input image, \code{in}, and the \code{mask} need not be
     
    11281126the appropriate offsets to obtain the correct pixel on the mask.  In
    11291127the event that the \code{mask} image is too small (i.e., pixels on the
    1130 input image refer to pixels outside the range of the \code{mask}
     1128input image correspond to pixels outside the range of the \code{mask}
    11311129image), the function shall generate an error.
    11321130
     
    11831181The \code{mask} shall be of type U8, and the input image,
    11841182\code{in}, must be of type F32.
     1183
     1184%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     1185
     1186\subsection{Paper Trail}
     1187
     1188The elements of the focal plane hierarchy each contain an
     1189\code{analysis} member, intended to log the results of the Phase 2
     1190tasks.  The Phase 2 tasks shall add to the \code{analysis} members as
     1191follows:
     1192
     1193\begin{itemize}
     1194\item \code{pmMaskBadPixels}:
     1195  \begin{itemize}
     1196  \item \code{MASK.DONE} (STR): The time at which masking was
     1197    completed.
     1198  \item \code{MASK.SAT} (S32): The number of saturated pixels masked
     1199    in the image
     1200  \item \code{MASK.SAT.GROW} (S32): The number of additional pixels
     1201    masked by growing the saturated pixels.
     1202  \item \code{MASK.BAD} (S32): The number of pixels masked in the
     1203    image
     1204  \item \code{MASK.BAD.GROW} (S32): The number of additional pixels
     1205    masked by growing the specified bad pixels.
     1206  \end{itemize}
     1207\item \code{pmNonLinearityPolynomial} and \code{pmNonLinearityLookup}:
     1208  \begin{itemize}
     1209  \item \code{NONLIN.DONE} (STR): The time at which the non-linearity
     1210    correction was completed.
     1211  \item \code{NONLIN.POLY} (STR): The polynomial coefficients used (if
     1212    applicable).
     1213  \item \code{NONLIN.LOOKUP} (STR): The filename for the lookup table
     1214    (if applicable).
     1215  \end{itemize}
     1216\item \code{pmSubtractBias}:
     1217  \begin{itemize}
     1218  \item \code{BIAS.DONE} (STR): The time at which the bias-subtraction
     1219    was completed.
     1220  \item \code{BIAS.OVERSCAN.AXIS} (STR): Overscan axis used.
     1221  \item \code{BIAS.OVERSCAN.FIT.TYPE} (STR): Fit type applied to
     1222    overscan.
     1223  \item \code{BIAS.OVERSCAN.FIT.COEFF} (STR): Coefficients of overscan
     1224    fit.
     1225  \item \code{BIAS.OVERSCAN.REGION} (STR): Overscan regions (from
     1226    \code{x0,y0,numCols,numRows}).
     1227  \item \code{BIAS.OVERSCAN.BIN} (S32): Number of pixels per bin used
     1228    in overscan.
     1229  \item \code{BIAS.OVERSCAN.MEAN} (F32): The mean of the binned
     1230    overscan pixels after subtracting the fit.
     1231  \item \code{BIAS.OVERSCAN.SD} (F32): The standard deviation of the
     1232    binned overscan pixels after subtracting the fit.
     1233  \end{itemize}
     1234\item \code{pmFlatField}:
     1235  \begin{itemize}
     1236  \item \code{FLAT.DONE} (STR): The time at which the flat-fielding
     1237    was completed.
     1238  \item \code{FLAT.BAD} (S32): Number of non-positive flat-field
     1239    pixels.
     1240  \end{itemize}
     1241\end{itemize}
     1242
     1243To be added by higher-levels:
     1244\begin{itemize}
     1245\item \code{BIAS.NAME} (STR): Name of bias image
     1246\item \code{DARK.NAME} (STR): Name of dark image
     1247\item \code{FLAT.NAME} (STR): Name of flat image
     1248\item \code{MASK.NAME} (STR): Name of mask image
     1249\end{itemize}
     1250
     1251%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    11851252
    11861253\section{Calibration}
Note: See TracChangeset for help on using the changeset viewer.