Index: /trunk/archive/pslib/include/psImage.h
===================================================================
--- /trunk/archive/pslib/include/psImage.h	(revision 1632)
+++ /trunk/archive/pslib/include/psImage.h	(revision 1633)
@@ -80,8 +80,8 @@
 /** Direction in which to cut */
 typedef enum {
-    PS_CUT_X_POS,			///< Cut in positive x direction
-    PS_CUT_X_NEG,			///< Cut in negative x direction
-    PS_CUT_Y_POS,			///< Cut in positive y direction
-    PS_CUT_Y_NEG			///< Cut in negative y direction
+    PS_CUT_X_POS,                     ///< Cut in positive x direction
+    PS_CUT_X_NEG,                     ///< Cut in negative x direction
+    PS_CUT_Y_POS,                     ///< Cut in positive y direction
+    PS_CUT_Y_NEG                      ///< Cut in negative y direction
 } psImageCutDirection;
 
@@ -89,14 +89,13 @@
 psVector *
 psImageSlice(psVector *out,		///< Vector to output, or NULL
-	     psVector *coords,		///< Returned coordinates along the slice, or NULL
 	     const psImage *input,	///< Input image
 	     const psImage *mask,	///< Ignore those pixels where mask & maskVal == 1.  May be NULL
 	     unsigned int maskVal,	///< Value in mask to ignore
-	     unsigned int x,		///< starting x coord of region to slice
-	     unsigned int y,		///< starting y coord of region to slice
-	     unsigned int nx,		///< length of region in x
-	     unsigned int ny,		///< length of region in y
+	     unsigned int x,            ///< starting x coord of region to slice
+	     unsigned int y,            ///< starting y coord of region to slice
+	     unsigned int nx,           ///< length of region in x
+	     unsigned int ny,           ///< length of region in y
 	     psImageCutDirection direction, ///< Direction in which to cut
-	     const psStats *stats	///< defines statistics used to find output values
+	     const psStats *stats       ///< defines statistics used to find output values
     );
 
@@ -111,7 +110,7 @@
 	   float xe, 			///< ending x coord of cut
 	   float ye, 			///< ending y coord of cut
-	   float dw, 			///< width of cut
-	   const psStats *stats)	///< defines statistics used to find output values
-;
+	   unsigned int nSamples,	///< Number of samples along the slice
+	   psImageInterpolateMode mode	///< defines statistics used to find output values
+	   );
 
 /// Extract radial annulii data to a vector.
Index: /trunk/doc/pslib/ChangeLogSDRS.tex
===================================================================
--- /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 1632)
+++ /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 1633)
@@ -252,3 +252,6 @@
 \item Added function \code{psTimeLeapSeconds} to calculate number of
   leap seconds between two dates, required for time arithmetic.
+\item Changed \code{psImageCut} to do a slice through the data in an
+  arbitrary direction, instead of merging the data along a particular
+  dimension.
 \end{itemize}
Index: /trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS.tex	(revision 1632)
+++ /trunk/doc/pslib/psLibSDRS.tex	(revision 1633)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.86 2004-08-26 21:43:50 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.87 2004-08-26 23:46:13 price Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -2341,21 +2341,21 @@
 \begin{verbatim}
 typedef enum {
-    PS_CUT_X_POS,
-    PS_CUT_X_NEG,
-    PS_CUT_Y_POS,
-    PS_CUT_Y_NEG
+    PS_CUT_X_POS,                     ///< Cut in positive x direction
+    PS_CUT_X_NEG,                     ///< Cut in negative x direction
+    PS_CUT_Y_POS,                     ///< Cut in positive y direction
+    PS_CUT_Y_NEG                      ///< Cut in negative y direction
 } psImageCutDirection;
 
-psVector *psImageSlice(psVector *out, 
+psVector *psImageSlice(psVector *out,
                        psVector *coords,
-                       const psImage *input, 
-                       const psImage *mask, 
+                       const psImage *input,
+                       const psImage *mask,
                        unsigned int maskVal,
-                       unsigned int x, 
-		       unsigned int y, 
-		       unsigned int nx, 
-		       unsigned int ny, 
-                       psImageCutDirection direction, 
-		       const psStats *stats);
+                       unsigned int x,
+                       unsigned int y,
+                       unsigned int nx,
+                       unsigned int ny,
+                       psImageCutDirection direction,
+                       const psStats *stats);
 \end{verbatim}
 Extract pixels from rectlinear region to a vector (array of floats).
@@ -2375,24 +2375,18 @@
 \begin{verbatim}
 psVector *psImageCut(psVector *out, const psImage *input, 
-                     const psImage *mask, 
-                     unsigned int maskVal,
+                     const psImage *mask, unsigned int maskVal,
                      float xs, float ys, float xe, float ye, 
-                     float dw, const psStats *stats);
-\end{verbatim}
-Extract pixels from an image along a line to a vector (array of
-floats).  The vector \code{(xs,ys)} - \code{(xe,ye)} forms the basis
-of the output vector.  Pixels are considered in a rectangular region
-of width \code{dw} about this vector.  The input region is collapsed
-in the perpendicular direction, and each element of the output vector
-represents pixel-sized boxes, where the value is derived from the
-statistics of the pixels interpolated along the perpendicular
-direction.  The specific algorithm which must be used is described in
-the PSLib ADD (PSDC-430-006).  The statistic used to derive the output
-vector value is specified by \code{stats}.  Only one of the statistics
-choices may be specified, otherwise the function must return an error.
-The \code{mask} and \code{maskVal} entries are passed to the psLib
-statistics function used to calculate the ensemble statistics.  This
-function must be defined for the following types: \code{psS8},
-\code{psU16}, \code{psF32}, \code{psF64}
+                     unsigned int nSamples, psImageInterpolateMode mode);
+\end{verbatim}
+Extract pixels along a line segment, \code{(xs,ys)} to \code{(xe,ye)},
+on the image to a vector (array of the appropriate data type).  The
+line segment is sampled \code{nSamples} times, hence the output vector
+contains \code{nSamples} elements.  The interpolation method used to
+derive the output vector value at each sample along the line segment
+is specified by \code{mode}.  If the \code{mask} is non-\code{NULL},
+then pixels for which the corresponding mask value is \code{maskVal}
+are not included in the interpolation.  This function must be defined
+for the following types: \code{psS8}, \code{psU16}, \code{psF32},
+\code{psF64}.
 
 \begin{verbatim}
