IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3734


Ignore:
Timestamp:
Apr 20, 2005, 5:30:12 PM (21 years ago)
Author:
Paul Price
Message:

Changed psPixels to psArrays of psPixelCoord

Location:
trunk/doc
Files:
4 edited

Legend:

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

    r3425 r3734  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.15 2005-03-15 23:13:12 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.16 2005-04-21 03:30:12 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    5555\item Added section on image subtraction
    5656\end{itemize}
     57
     58\subsection{Changes from version 04 to version 06 (Present)}
     59
     60\begin{itemize}
     61\item Updated \code{psPixels} to \code{psArray} of \code{psPixelCoord}.
     62\end{itemize}
  • trunk/doc/modules/ModulesSDRS.tex

    r3427 r3734  
    1 %%% $Id: ModulesSDRS.tex,v 1.35 2005-03-15 23:19:36 price Exp $
     1%%% $Id: ModulesSDRS.tex,v 1.36 2005-04-21 03:30:12 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    16351635\end{enumerate}
    16361636
    1637 The function shall return an array of \code{psPixels}, one for each of
    1638 the input \code{images}, containing pixels that have been identified
    1639 as cosmic rays according to the above criteria.
     1637The function shall return a \code{psArray} of \code{psArray}s of
     1638\code{psPixelCoord}, one \code{psArray} for each of the input
     1639\code{images}, containing pixels that have been identified as cosmic
     1640rays according to the above criteria.
    16401641
    16411642If any of the input pointers are \code{NULL}, then the function shall
     
    16691670
    16701671    for (int i = 0; i < nImages; i++) {
    1671         psPixels *blanks = NULL;        // List of blank pixels
     1672        psArray *blanks = NULL;        // List of blank pixels
    16721673        transformed->data[i] = psImageTransform(NULL, &blanks, inputs->data[i],
    16731674                                                inputMask->data[i], inputMaskVal, NAN, skyToDetector,
     
    16901691                                        NULL, numIter, sigmaClip, combineStats); // Combined image
    16911692    psArray *bad = pmRejectPixels(inputs, rejected, NULL, skyToDetector, rejThreshold, gradLimit); // Bad pix
    1692     psPixels *combinePixels = NULL;     // Pixels to combine
     1693    psArray *combinePixels = NULL;     // Pixels to combine
    16931694    for (int i = 0; i < nImages; i++) {
    1694         psPixels *badSource = psPixelsTransform(NULL, bad->data[i], skyToDetector); // Bad pixels on the input
     1695        psArray *badSource = psPixelsTransform(NULL, bad->data[i], skyToDetector); // Bad pixels on the input
    16951696        psImage *badMask = psPixelsToMask(NULL, badSource, PS_MASK_COSMICRAY); // Mask image for the input
    16961697        (void)psBinaryOp(inputMask->data[i], inputMask->data[i], "|", badMask); // Put CRs into original mask
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r3663 r3734  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.85 2005-04-05 21:26:50 jhoblitt Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.86 2005-04-21 03:26:00 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    481481  from a file.
    482482\item \code{psMetadataAddV} changed to use \code{va_list} parameter (bug 312).
    483 
     483 
    484484\item Modified \code{psImageTransform} in preparation for image combination.
    485 
     485 
    486486\item Added \code{psPixels} structure and related functions
    487487\item Added \code{psPlaneTransformDeriv}.
    488488\item Added \code{psImageGrowMask}.
    489489\item Added Earth Orientation Calculations Section
    490 
     490 
    491491\item Changes to the Time section:
    492 \begin{itemize}
    493 \item Add \code{psTimeBulliten} enum
    494 \item Add \code{leapsecond} member to \code{psTimeType}
    495 \item Change \code{psTime.usec} $\rightarrow$ \code{psTime.nsec} (nanoseconds)
    496 \item Minor reorganization and additional comments
    497 \item Rename \code{psTimeGetTime()} $\rightarrow$ \code{psTimeGetNow()}
    498 \item New rules for time system converstion
    499 \item Rename \code{psTimeToLST()} $\rightarrow$ \code{psTimeToLMST()}
    500 \item Rename \code{psTimeLeapSeconds()} $\rightarrow$ \code{psTimeLeapSecondDelta()}
    501 \item Add \code{psTimeIsLeapSecond()}
    502 \item ISO8601 format clarifications
    503 \item Rename \code{psTimeToISOTime()} $\rightarrow$ \code{psTimeToISO()}
    504 \item Add \code{psTimeFromUTC()}
    505 \item Add \code{psTimeFromTT()}
    506 \item Change \code{psTime} math rules
    507 \item Change ``Time Tables'' to have IERS Bulliten A \& B
    508 \item Add Dates \& Times Test Inputs appendix
    509 \end{itemize}
    510 
     492  \begin{itemize}
     493  \item Add \code{psTimeBulliten} enum
     494  \item Add \code{leapsecond} member to \code{psTimeType}
     495  \item Change \code{psTime.usec} $\rightarrow$ \code{psTime.nsec} (nanoseconds)
     496  \item Minor reorganization and additional comments
     497  \item Rename \code{psTimeGetTime()} $\rightarrow$ \code{psTimeGetNow()}
     498  \item New rules for time system converstion
     499  \item Rename \code{psTimeToLST()} $\rightarrow$ \code{psTimeToLMST()}
     500  \item Rename \code{psTimeLeapSeconds()} $\rightarrow$ \code{psTimeLeapSecondDelta()}
     501  \item Add \code{psTimeIsLeapSecond()}
     502  \item ISO8601 format clarifications
     503  \item Rename \code{psTimeToISOTime()} $\rightarrow$ \code{psTimeToISO()}
     504  \item Add \code{psTimeFromUTC()}
     505  \item Add \code{psTimeFromTT()}
     506  \item Change \code{psTime} math rules
     507  \item Change ``Time Tables'' to have IERS Bulliten A \& B
     508  \item Add Dates \& Times Test Inputs appendix
     509  \end{itemize}
     510 
    511511\item Adding logical operations (and, or) to \code{psBinaryOp}.
    512 
     512 
    513513\item Substantial reorganization:
    514 \begin{itemize}
    515 \item Moved Metadata, Database, and XML sections to new section
    516 \item Re-named Detector \& Sky Coordinates to Linear \& Spherical Coordinates
    517 \item Moved Exposure and Observatory information out of 'Astronomical Images'
    518 \item Moved Celestial Coordinate Systems out of 'Detector \& Sky Coordinates'
    519 \item Added Atmospheric Effects section, incorporating psGrommit and airmass functions from other sections)
    520 \item Moved Fixed Pattern out of Astronomical Images
    521 \end{itemize}
    522 
     514  \begin{itemize}
     515  \item Moved Metadata, Database, and XML sections to new section
     516  \item Re-named Detector \& Sky Coordinates to Linear \& Spherical Coordinates
     517  \item Moved Exposure and Observatory information out of 'Astronomical Images'
     518  \item Moved Celestial Coordinate Systems out of 'Detector \& Sky Coordinates'
     519  \item Added Atmospheric Effects section, incorporating psGrommit and airmass functions from other sections)
     520  \item Moved Fixed Pattern out of Astronomical Images
     521  \end{itemize}
     522 
    523523\item Restrictions on the use of \code{malloc}, \code{calloc}, \code{realloc}, and \code{free} should not be unintentionaly imposed on 3rd party code.
    524524\item Add database support for ``auto-incrementing''
    525 
     525 
    526526\item Changes to Configuration Files:
    527 \begin{itemize}
    528 \item Add \code{UTC,UT1,TAI,TT} types
    529 \item Change ``multiple symbol'' declaration format to \code{[keyword] MULTI}
    530 \item Add Scoping Rules
    531 \item Remove Configuration File Grammar appendix
    532 \item Add Configuration File Test Inputs appendix
    533 \item Rename \code{psMetadataParseConfig()} $\rightarrow$ \code{psMetadataConfigParse()}
    534 \item Add \code{psMetadataConfigFormat()}
    535 \item Add \code{psMetadataConfigWrite()}
    536 \end{itemize}
    537 
     527  \begin{itemize}
     528  \item Add \code{UTC,UT1,TAI,TT} types
     529  \item Change ``multiple symbol'' declaration format to \code{[keyword] MULTI}
     530  \item Add Scoping Rules
     531  \item Remove Configuration File Grammar appendix
     532  \item Add Configuration File Test Inputs appendix
     533  \item Rename \code{psMetadataParseConfig()} $\rightarrow$ \code{psMetadataConfigParse()}
     534  \item Add \code{psMetadataConfigFormat()}
     535  \item Add \code{psMetadataConfigWrite()}
     536  \end{itemize}
     537 
    538538\item Add \code{PS_META_TIME} to \code{psMetadataType}
    539 \end{itemize}
     539\item Changed \code{psPixels} to \code{psArray}s of \code{psPixelCoord}.
     540\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r3686 r3734  
    1 %%% $Id: psLibSDRS.tex,v 1.202 2005-04-08 19:53:30 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.203 2005-04-21 03:26:00 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    28552855
    28562856\begin{verbatim}
    2857 psImage *psImageTransform(psImage *output, psPixels **blankPixels, const psImage *input,
     2857psImage *psImageTransform(psImage *output, psArray **blankPixels, const psImage *input,
    28582858                          const psImage *inputMask, int inputMaskVal, const psPlaneTransform *outToIn,
    2859                           const psRegion *region, const psPixels *pixels, psImageInterpolateMode mode,
     2859                          const psRegion *region, const psArray *pixels, psImageInterpolateMode mode,
    28602860                          double exposedValue);
    28612861\end{verbatim}
     
    28752875in the output image --- note that this is the reverse of what might be
    28762876naively expected, but it is what is required in order to use
    2877 \code{psImagePixelInterpolate}.  If \code{pixels} is non-\code{NULL},
    2878 then only those pixels in the output image are transformed; otherwise,
    2879 the entire image is generated.  The interpolation is performed using
    2880 the specified interpolation \code{mode}.  Where a pixel in the output
     2877\code{psImagePixelInterpolate}.  If the \code{pixels} array is
     2878non-\code{NULL}, it shall consist of \code{psPixelCoord}s, and only
     2879those pixels in the output image shall be transformed; otherwise, the
     2880entire image is generated.  The interpolation is performed using the
     2881specified interpolation \code{mode}.  Where a pixel in the output
    28812882image does not correspond to a pixel in the input image (or all
    28822883appropriate pixels in the input image are masked), the value shall be
    2883 set to \code{exposed}, and the pixel added to the list of
    2884 \code{blankPixels} for return to the user.  This function must be
    2885 capable of handling the following types for the \code{input} (with
    2886 corresponding types for the \code{output}): \code{psF32},
    2887 \code{psF64}.
     2884set to \code{exposed}, and the appropriate \code{psPixelCoord} added
     2885to the array of \code{blankPixels} for return to the user.  This
     2886function must be capable of handling the following types for the
     2887\code{input} (with corresponding types for the \code{output}):
     2888\code{psF32}, \code{psF64}.
    28882889
    28892890
     
    30493050\begin{verbatim}
    30503051typedef struct {
    3051     psVector *x;                        // x coordinate
    3052     psVector *y;                        // y coordinate
    3053 } psPixels;
    3054 \end{verbatim}
    3055 
    3056 Of course, the size of each of the vectors should match.  In the event
    3057 that they do not match, any function which detects the problem shall
    3058 generate a warning and use the size of the shorter of the vectors as
    3059 the size.  The order in which the pixels are kept is not considered
    3060 important.
    3061 
    3062 \begin{verbatim}
    3063 psImage *psPixelsToMask(psImage *out, const psPixels *pixels, const psRegion *region, unsigned int maskVal);
    3064 psPixels *psMaskToPixels(psPixels *out, const psImage *mask, unsigned int maskVal);
     3052    int x;                      // x coordinate
     3053    int y;                      // y coordinate
     3054} psPixelCoord;
     3055\end{verbatim}
     3056
     3057\begin{verbatim}
     3058psImage *psPixelsToMask(psImage *out, const psArray *pixels, const psRegion *region, unsigned int maskVal);
     3059psArray *psMaskToPixels(psArray *out, const psImage *mask, unsigned int maskVal);
    30653060\end{verbatim}
    30663061
    30673062\code{psPixelsToMask} shall return an image of type U8 with the
    3068 \code{pixels} lying within the specified \code{region} set to the
    3069 \code{maskVal}.  The \code{out} image shall be modified if supplied,
    3070 or allocated and returned if \code{NULL}.  The size of the output
    3071 image shall be \code{region->x1 - region->x0} by \code{region->y1 -
    3072 region->y0}, with \code{out->x0 = region->x0} and \code{out->y0 =
    3073 region->y0}.  In the event that either of \code{pixels} or
    3074 \code{region} are \code{NULL}, the function shall generate an error
    3075 and return \code{NULL}.
    3076 
    3077 \code{psMaskToPixels} shall return a \code{psPixels} consisting of the
    3078 coordinates in the \code{mask} that match the \code{maskVal}.  The
    3079 \code{out} pixel list shall be modified if supplied, or allocated and
    3080 returned if \code{NULL}.  In hte event that \code{mask} is
    3081 \code{NULL}, the function shall generate an error and return
    3082 \code{NULL}.
    3083 
    3084 \begin{verbatim}
    3085 psPixels *psPixelsConcatenate(psPixels *out, const psPixels *pixels);
    3086 \end{verbatim}
    3087 
    3088 \code{psPixelsConcatenate} shall concatenate \code{pixels} onto
    3089 \code{out}.  In the event that \code{out} is \code{NULL}, a new
    3090 \code{psPixels} shall be allocated, and the contents of \code{pixels}
    3091 simply copied in.  If \code{pixels} is \code{NULL}, the function shall
    3092 generate an error and return \code{NULL}.  The function shall take
    3093 care to ensure that there are no duplicate pixels in \code{out} (since
    3094 the order in which the pixels are stored is not important, the values
    3095 may be sorted, allowing the use of a faster algorithm than a linear
    3096 scan).
     3063\code{pixels} (being a \code{psArray} of \code{psPixelCoord}s) lying
     3064within the specified \code{region} set to the \code{maskVal}.  The
     3065\code{out} image shall be modified if supplied, or allocated and
     3066returned if \code{NULL}.  The size of the output image shall be
     3067\code{region->x1 - region->x0} by \code{region->y1 - region->y0}, with
     3068\code{out->x0 = region->x0} and \code{out->y0 = region->y0}.  In the
     3069event that either of \code{pixels} or \code{region} are \code{NULL},
     3070the function shall generate an error and return \code{NULL}.
     3071
     3072\code{psMaskToPixels} shall return a \code{psArray} containing one
     3073\code{psPixelCoord} for each of the coordinates in the \code{mask}
     3074that match the \code{maskVal}.  The \code{out} pixel list shall be
     3075modified if supplied, or allocated and returned if \code{NULL}.  In
     3076hte event that \code{mask} is \code{NULL}, the function shall generate
     3077an error and return \code{NULL}.
     3078
     3079\begin{verbatim}
     3080psArray *psPixelsConcatenate(psArray *out, const psArray *pixels);
     3081\end{verbatim}
     3082
     3083\code{psPixelsConcatenate} shall concatenate the array of
     3084\code{pixels} (consisting of \code{psPixelCoord}s) onto \code{out}.
     3085In the event that \code{out} is \code{NULL}, a new \code{psArray}
     3086shall be allocated, and the contents of \code{pixels} simply copied
     3087in.  If \code{pixels} is \code{NULL}, the function shall generate an
     3088error and return \code{NULL}.  The function shall take care to ensure
     3089that there are no duplicate pixels in \code{out} (since the order in
     3090which the pixels are stored is not important, the values may be
     3091sorted, allowing the use of a faster algorithm than a linear scan).
    30973092
    30983093%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    51485143
    51495144\begin{verbatim}
    5150 psPixels *psPixelsTransform(psPixels *out, const psPixels *input, const psPlaneTransform *inToOut);
    5151 \end{verbatim}
    5152 
    5153 \code{psPixelsTransform} shall generate a list of pixels in the output
    5154 coordinate frame that overlap the \code{input} pixels in the input
     5145psArray *psPixelsTransform(psArray *out, const psArray *input, const psPlaneTransform *inToOut);
     5146\end{verbatim}
     5147
     5148\code{psPixelsTransform} shall generate an array of pixels
     5149(\code{psPixelCoord} in the output coordinate frame that overlap the
     5150\code{input} pixels (an array of \code{psPixelCoord}s) in the input
    51555151coordinate frame through the specified transformation, \code{inToOut}.
    51565152Note that this is more complicated than simply transforming the
Note: See TracChangeset for help on using the changeset viewer.