Index: /trunk/doc/modules/ChangeLogSDRS.tex
===================================================================
--- /trunk/doc/modules/ChangeLogSDRS.tex	(revision 3733)
+++ /trunk/doc/modules/ChangeLogSDRS.tex	(revision 3734)
@@ -1,3 +1,3 @@
-%%% $Id: ChangeLogSDRS.tex,v 1.15 2005-03-15 23:13:12 price Exp $
+%%% $Id: ChangeLogSDRS.tex,v 1.16 2005-04-21 03:30:12 price Exp $
 
 \subsection{Changes from version 00 to version 01}
@@ -55,2 +55,8 @@
 \item Added section on image subtraction
 \end{itemize}
+
+\subsection{Changes from version 04 to version 06 (Present)}
+
+\begin{itemize}
+\item Updated \code{psPixels} to \code{psArray} of \code{psPixelCoord}.
+\end{itemize}
Index: /trunk/doc/modules/ModulesSDRS.tex
===================================================================
--- /trunk/doc/modules/ModulesSDRS.tex	(revision 3733)
+++ /trunk/doc/modules/ModulesSDRS.tex	(revision 3734)
@@ -1,3 +1,3 @@
-%%% $Id: ModulesSDRS.tex,v 1.35 2005-03-15 23:19:36 price Exp $
+%%% $Id: ModulesSDRS.tex,v 1.36 2005-04-21 03:30:12 price Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -1635,7 +1635,8 @@
 \end{enumerate}
 
-The function shall return an array of \code{psPixels}, one for each of
-the input \code{images}, containing pixels that have been identified
-as cosmic rays according to the above criteria.
+The function shall return a \code{psArray} of \code{psArray}s of
+\code{psPixelCoord}, one \code{psArray} for each of the input
+\code{images}, containing pixels that have been identified as cosmic
+rays according to the above criteria.
 
 If any of the input pointers are \code{NULL}, then the function shall
@@ -1669,5 +1670,5 @@
 
     for (int i = 0; i < nImages; i++) {
-        psPixels *blanks = NULL;        // List of blank pixels
+        psArray *blanks = NULL;        // List of blank pixels
         transformed->data[i] = psImageTransform(NULL, &blanks, inputs->data[i],
                                                 inputMask->data[i], inputMaskVal, NAN, skyToDetector,
@@ -1690,7 +1691,7 @@
                                         NULL, numIter, sigmaClip, combineStats); // Combined image
     psArray *bad = pmRejectPixels(inputs, rejected, NULL, skyToDetector, rejThreshold, gradLimit); // Bad pix
-    psPixels *combinePixels = NULL;     // Pixels to combine
+    psArray *combinePixels = NULL;     // Pixels to combine
     for (int i = 0; i < nImages; i++) {
-        psPixels *badSource = psPixelsTransform(NULL, bad->data[i], skyToDetector); // Bad pixels on the input
+        psArray *badSource = psPixelsTransform(NULL, bad->data[i], skyToDetector); // Bad pixels on the input
         psImage *badMask = psPixelsToMask(NULL, badSource, PS_MASK_COSMICRAY); // Mask image for the input
         (void)psBinaryOp(inputMask->data[i], inputMask->data[i], "|", badMask); // Put CRs into original mask
Index: /trunk/doc/pslib/ChangeLogSDRS.tex
===================================================================
--- /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 3733)
+++ /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 3734)
@@ -1,3 +1,3 @@
-%%% $Id: ChangeLogSDRS.tex,v 1.85 2005-04-05 21:26:50 jhoblitt Exp $
+%%% $Id: ChangeLogSDRS.tex,v 1.86 2005-04-21 03:26:00 price Exp $
 
 \subsection{Changes from version 00 to version 01}
@@ -481,59 +481,60 @@
   from a file.
 \item \code{psMetadataAddV} changed to use \code{va_list} parameter (bug 312).
-
+  
 \item Modified \code{psImageTransform} in preparation for image combination.
-
+  
 \item Added \code{psPixels} structure and related functions
 \item Added \code{psPlaneTransformDeriv}.
 \item Added \code{psImageGrowMask}.
 \item Added Earth Orientation Calculations Section
-
+  
 \item Changes to the Time section:
-\begin{itemize}
-\item Add \code{psTimeBulliten} enum
-\item Add \code{leapsecond} member to \code{psTimeType}
-\item Change \code{psTime.usec} $\rightarrow$ \code{psTime.nsec} (nanoseconds)
-\item Minor reorganization and additional comments
-\item Rename \code{psTimeGetTime()} $\rightarrow$ \code{psTimeGetNow()}
-\item New rules for time system converstion
-\item Rename \code{psTimeToLST()} $\rightarrow$ \code{psTimeToLMST()}
-\item Rename \code{psTimeLeapSeconds()} $\rightarrow$ \code{psTimeLeapSecondDelta()}
-\item Add \code{psTimeIsLeapSecond()}
-\item ISO8601 format clarifications
-\item Rename \code{psTimeToISOTime()} $\rightarrow$ \code{psTimeToISO()}
-\item Add \code{psTimeFromUTC()}
-\item Add \code{psTimeFromTT()}
-\item Change \code{psTime} math rules
-\item Change ``Time Tables'' to have IERS Bulliten A \& B
-\item Add Dates \& Times Test Inputs appendix
-\end{itemize}
-
+  \begin{itemize}
+  \item Add \code{psTimeBulliten} enum
+  \item Add \code{leapsecond} member to \code{psTimeType}
+  \item Change \code{psTime.usec} $\rightarrow$ \code{psTime.nsec} (nanoseconds)
+  \item Minor reorganization and additional comments
+  \item Rename \code{psTimeGetTime()} $\rightarrow$ \code{psTimeGetNow()}
+  \item New rules for time system converstion
+  \item Rename \code{psTimeToLST()} $\rightarrow$ \code{psTimeToLMST()}
+  \item Rename \code{psTimeLeapSeconds()} $\rightarrow$ \code{psTimeLeapSecondDelta()}
+  \item Add \code{psTimeIsLeapSecond()}
+  \item ISO8601 format clarifications
+  \item Rename \code{psTimeToISOTime()} $\rightarrow$ \code{psTimeToISO()}
+  \item Add \code{psTimeFromUTC()}
+  \item Add \code{psTimeFromTT()}
+  \item Change \code{psTime} math rules
+  \item Change ``Time Tables'' to have IERS Bulliten A \& B
+  \item Add Dates \& Times Test Inputs appendix
+  \end{itemize}
+  
 \item Adding logical operations (and, or) to \code{psBinaryOp}.
-
+  
 \item Substantial reorganization:
-\begin{itemize}
-\item Moved Metadata, Database, and XML sections to new section
-\item Re-named Detector \& Sky Coordinates to Linear \& Spherical Coordinates
-\item Moved Exposure and Observatory information out of 'Astronomical Images'
-\item Moved Celestial Coordinate Systems out of 'Detector \& Sky Coordinates'
-\item Added Atmospheric Effects section, incorporating psGrommit and airmass functions from other sections)
-\item Moved Fixed Pattern out of Astronomical Images 
-\end{itemize}
-
+  \begin{itemize}
+  \item Moved Metadata, Database, and XML sections to new section
+  \item Re-named Detector \& Sky Coordinates to Linear \& Spherical Coordinates
+  \item Moved Exposure and Observatory information out of 'Astronomical Images'
+  \item Moved Celestial Coordinate Systems out of 'Detector \& Sky Coordinates'
+  \item Added Atmospheric Effects section, incorporating psGrommit and airmass functions from other sections)
+  \item Moved Fixed Pattern out of Astronomical Images 
+  \end{itemize}
+  
 \item Restrictions on the use of \code{malloc}, \code{calloc}, \code{realloc}, and \code{free} should not be unintentionaly imposed on 3rd party code.
 \item Add database support for ``auto-incrementing''
-
+  
 \item Changes to Configuration Files:
-\begin{itemize}
-\item Add \code{UTC,UT1,TAI,TT} types
-\item Change ``multiple symbol'' declaration format to \code{[keyword] MULTI}
-\item Add Scoping Rules
-\item Remove Configuration File Grammar appendix
-\item Add Configuration File Test Inputs appendix
-\item Rename \code{psMetadataParseConfig()} $\rightarrow$ \code{psMetadataConfigParse()}
-\item Add \code{psMetadataConfigFormat()}
-\item Add \code{psMetadataConfigWrite()}
-\end{itemize}
-
+  \begin{itemize}
+  \item Add \code{UTC,UT1,TAI,TT} types
+  \item Change ``multiple symbol'' declaration format to \code{[keyword] MULTI}
+  \item Add Scoping Rules
+  \item Remove Configuration File Grammar appendix
+  \item Add Configuration File Test Inputs appendix
+  \item Rename \code{psMetadataParseConfig()} $\rightarrow$ \code{psMetadataConfigParse()}
+  \item Add \code{psMetadataConfigFormat()}
+  \item Add \code{psMetadataConfigWrite()}
+  \end{itemize}
+  
 \item Add \code{PS_META_TIME} to \code{psMetadataType}
-\end{itemize}
+\item Changed \code{psPixels} to \code{psArray}s of \code{psPixelCoord}.
+\end{itemize}
Index: /trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS.tex	(revision 3733)
+++ /trunk/doc/pslib/psLibSDRS.tex	(revision 3734)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.202 2005-04-08 19:53:30 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.203 2005-04-21 03:26:00 price Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -2855,7 +2855,7 @@
 
 \begin{verbatim}
-psImage *psImageTransform(psImage *output, psPixels **blankPixels, const psImage *input,
+psImage *psImageTransform(psImage *output, psArray **blankPixels, const psImage *input,
                           const psImage *inputMask, int inputMaskVal, const psPlaneTransform *outToIn,
-			  const psRegion *region, const psPixels *pixels, psImageInterpolateMode mode,
+			  const psRegion *region, const psArray *pixels, psImageInterpolateMode mode,
 			  double exposedValue);
 \end{verbatim}
@@ -2875,15 +2875,16 @@
 in the output image --- note that this is the reverse of what might be
 naively expected, but it is what is required in order to use
-\code{psImagePixelInterpolate}.  If \code{pixels} is non-\code{NULL},
-then only those pixels in the output image are transformed; otherwise,
-the entire image is generated.  The interpolation is performed using
-the specified interpolation \code{mode}.  Where a pixel in the output
+\code{psImagePixelInterpolate}.  If the \code{pixels} array is
+non-\code{NULL}, it shall consist of \code{psPixelCoord}s, and only
+those pixels in the output image shall be transformed; otherwise, the
+entire image is generated.  The interpolation is performed using the
+specified interpolation \code{mode}.  Where a pixel in the output
 image does not correspond to a pixel in the input image (or all
 appropriate pixels in the input image are masked), the value shall be
-set to \code{exposed}, and the pixel added to the list of
-\code{blankPixels} for return to the user.  This function must be
-capable of handling the following types for the \code{input} (with
-corresponding types for the \code{output}): \code{psF32},
-\code{psF64}.
+set to \code{exposed}, and the appropriate \code{psPixelCoord} added
+to the array of \code{blankPixels} for return to the user.  This
+function must be capable of handling the following types for the
+\code{input} (with corresponding types for the \code{output}):
+\code{psF32}, \code{psF64}.
 
 
@@ -3049,50 +3050,44 @@
 \begin{verbatim}
 typedef struct {
-    psVector *x;			// x coordinate
-    psVector *y;			// y coordinate
-} psPixels;
-\end{verbatim}
-
-Of course, the size of each of the vectors should match.  In the event
-that they do not match, any function which detects the problem shall
-generate a warning and use the size of the shorter of the vectors as
-the size.  The order in which the pixels are kept is not considered
-important.
-
-\begin{verbatim}
-psImage *psPixelsToMask(psImage *out, const psPixels *pixels, const psRegion *region, unsigned int maskVal);
-psPixels *psMaskToPixels(psPixels *out, const psImage *mask, unsigned int maskVal);
+    int x;			// x coordinate
+    int y;			// y coordinate
+} psPixelCoord;
+\end{verbatim}
+
+\begin{verbatim}
+psImage *psPixelsToMask(psImage *out, const psArray *pixels, const psRegion *region, unsigned int maskVal);
+psArray *psMaskToPixels(psArray *out, const psImage *mask, unsigned int maskVal);
 \end{verbatim}
 
 \code{psPixelsToMask} shall return an image of type U8 with the
-\code{pixels} lying within the specified \code{region} set to the
-\code{maskVal}.  The \code{out} image shall be modified if supplied,
-or allocated and returned if \code{NULL}.  The size of the output
-image shall be \code{region->x1 - region->x0} by \code{region->y1 -
-region->y0}, with \code{out->x0 = region->x0} and \code{out->y0 =
-region->y0}.  In the event that either of \code{pixels} or
-\code{region} are \code{NULL}, the function shall generate an error
-and return \code{NULL}.
-
-\code{psMaskToPixels} shall return a \code{psPixels} consisting of the
-coordinates in the \code{mask} that match the \code{maskVal}.  The
-\code{out} pixel list shall be modified if supplied, or allocated and
-returned if \code{NULL}.  In hte event that \code{mask} is
-\code{NULL}, the function shall generate an error and return
-\code{NULL}.
-
-\begin{verbatim}
-psPixels *psPixelsConcatenate(psPixels *out, const psPixels *pixels);
-\end{verbatim}
-
-\code{psPixelsConcatenate} shall concatenate \code{pixels} onto
-\code{out}.  In the event that \code{out} is \code{NULL}, a new
-\code{psPixels} shall be allocated, and the contents of \code{pixels}
-simply copied in.  If \code{pixels} is \code{NULL}, the function shall
-generate an error and return \code{NULL}.  The function shall take
-care to ensure that there are no duplicate pixels in \code{out} (since
-the order in which the pixels are stored is not important, the values
-may be sorted, allowing the use of a faster algorithm than a linear
-scan).
+\code{pixels} (being a \code{psArray} of \code{psPixelCoord}s) lying
+within the specified \code{region} set to the \code{maskVal}.  The
+\code{out} image shall be modified if supplied, or allocated and
+returned if \code{NULL}.  The size of the output image shall be
+\code{region->x1 - region->x0} by \code{region->y1 - region->y0}, with
+\code{out->x0 = region->x0} and \code{out->y0 = region->y0}.  In the
+event that either of \code{pixels} or \code{region} are \code{NULL},
+the function shall generate an error and return \code{NULL}.
+
+\code{psMaskToPixels} shall return a \code{psArray} containing one
+\code{psPixelCoord} for each of the coordinates in the \code{mask}
+that match the \code{maskVal}.  The \code{out} pixel list shall be
+modified if supplied, or allocated and returned if \code{NULL}.  In
+hte event that \code{mask} is \code{NULL}, the function shall generate
+an error and return \code{NULL}.
+
+\begin{verbatim}
+psArray *psPixelsConcatenate(psArray *out, const psArray *pixels);
+\end{verbatim}
+
+\code{psPixelsConcatenate} shall concatenate the array of
+\code{pixels} (consisting of \code{psPixelCoord}s) onto \code{out}.
+In the event that \code{out} is \code{NULL}, a new \code{psArray}
+shall be allocated, and the contents of \code{pixels} simply copied
+in.  If \code{pixels} is \code{NULL}, the function shall generate an
+error and return \code{NULL}.  The function shall take care to ensure
+that there are no duplicate pixels in \code{out} (since the order in
+which the pixels are stored is not important, the values may be
+sorted, allowing the use of a faster algorithm than a linear scan).
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5148,9 +5143,10 @@
 
 \begin{verbatim}
-psPixels *psPixelsTransform(psPixels *out, const psPixels *input, const psPlaneTransform *inToOut);
-\end{verbatim}
-
-\code{psPixelsTransform} shall generate a list of pixels in the output
-coordinate frame that overlap the \code{input} pixels in the input
+psArray *psPixelsTransform(psArray *out, const psArray *input, const psPlaneTransform *inToOut);
+\end{verbatim}
+
+\code{psPixelsTransform} shall generate an array of pixels
+(\code{psPixelCoord} in the output coordinate frame that overlap the
+\code{input} pixels (an array of \code{psPixelCoord}s) in the input
 coordinate frame through the specified transformation, \code{inToOut}.
 Note that this is more complicated than simply transforming the
