Index: trunk/archive/pslib/include/psImages.h
===================================================================
--- trunk/archive/pslib/include/psImages.h	(revision 206)
+++ trunk/archive/pslib/include/psImages.h	(revision 215)
@@ -74,5 +74,5 @@
 	      int ny, 			///< width of region in y
 	      int direction,		///< direction of vector along slice
-	      psStatMode statmode	///< statistic applied to pixel group to find output value
+	      psStats *stats		///< defines statistics used to find output values
 );
 
@@ -85,5 +85,5 @@
 	    float ye, 			///< ending y coord of cut
 	    float dw, 			///< width of cut
-	    psStatMode statmode		///< statistic applied to pixel group to find output value
+	    psStats *stats		///< defines statistics used to find output values
     );
 
@@ -95,5 +95,5 @@
 		  float radius, 	///< outer radius of annulii
 		  float dr,		///< radial step size of annulii
-		  psStatMode statmode	///< statistic applied to pixel group to find output value
+		  psStats *stats		///< defines statistics used to find output values
     );
 
@@ -110,5 +110,5 @@
 psImageRebin (psImage *input, 		///< rebin this image
 	      float scale, 		///< rebinning scale: doutput = scale*dinput
-	      psStatMode statmode	///< statistic used in performing interpolation / summing
+	      psStats *stats		///< defines statistics used to find output values
 );
 
@@ -137,8 +137,7 @@
 
 /// Determine statistics for image (or subimage).
-/// Should we have one function for all stats, or multiple functions?
-/// How to represent the output values?
-void
-psImageGetStats (psImage *input, psStatMode statmode);
+psStats *
+psImageGetStats (psImage *input, 	///< image (or subimage) to calculate stats
+		 psStats *stats);	///< defines statistics to be calculated
 
 /// Construct a histogram from an image (or subimage).
@@ -149,8 +148,13 @@
 
 /// Fit a 2-D polynomial surface to an image.
-psFloatArrayArray *
+psPolynomial2D *
 psImageFitPolynomial (psImage *input, 	///< image to fit
-		      int xorder,	///< order of polynomial in x-dir
-		      int yorder	///< order of polynomial in y-dir
+		      psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
+);
+
+/// Evaluate a 2-D polynomial surface to image pixels.
+int
+psImageEvalPolynomial (psImage *input, 	///< image to fit
+		       psPolynomial2D *coeffs ///< coefficient structure carries in desired terms
 );
 
