Index: trunk/stac/src/stac.h
===================================================================
--- trunk/stac/src/stac.h	(revision 5743)
+++ trunk/stac/src/stac.h	(revision 6887)
@@ -19,5 +19,5 @@
 // Read the input files and return an array of images
 psArray *stacReadImages(psArray **headers, // The image headers, to be returned
-			psArray *filenames // The file names of the images
+                        psArray *filenames // The file names of the images
     );
 
@@ -38,6 +38,6 @@
 // Calculate the error images
 psArray *stacErrorImages(psArray *inputs, // Array of input images
-			 float gain,	// Gain, in e/ADU
-			 float rn	// Read noise, in e
+                         float gain,    // Gain, in e/ADU
+                         float rn       // Read noise, in e
     );
 
@@ -47,14 +47,14 @@
 
 // Transform input images, return success
-bool stacTransform(psArray **outputs,	// Transformed images for output
-		   psArray **outErrors, // Transformed error images for output
-		   const psArray *images, // Array of images to be transformed
-		   const psArray *maps, // Array of polynomials that do the transformation
-		   const psArray *errors, // Array of error images to be transformed
-		   const psArray *masks, // Masks of input images
-		   const psImage *region, // Region of interest for transformation
-		   const psVector *scales, // Relative scales
-		   const psVector *offsets, // Relative offsets
-		   int outnx, int outny	// Size of output images
+bool stacTransform(psArray **outputs,   // Transformed images for output
+                   psArray **outErrors, // Transformed error images for output
+                   const psArray *images, // Array of images to be transformed
+                   const psArray *maps, // Array of polynomials that do the transformation
+                   const psArray *errors, // Array of error images to be transformed
+                   const psArray *masks, // Masks of input images
+                   const psImage *region, // Region of interest for transformation
+                   const psVector *scales, // Relative scales
+                   const psVector *offsets, // Relative offsets
+                   int outnx, int outny // Size of output images
     );
 
@@ -68,6 +68,6 @@
 // Print out the problem
 void stacMemoryProblem(const psMemBlock* ptr, ///< the pointer to the problematic memory block.
-		       const char *file, ///< the file in which the problem originated
-		       psS32 lineno	///< the line number in which the problem originated
+                       const char *file, ///< the file in which the problem originated
+                       psS32 lineno     ///< the line number in which the problem originated
     );
 
@@ -81,25 +81,25 @@
 
 // Get the mean for a bunch of values
-float stacCombineMean(psVector *values,	// Values for which to take the mean
-		      psVector *errors,	// Errors in the values
-		      psVector *masks	// Masks for the values, 0 = don't use, 1 = use
+float stacCombineMean(psVector *values, // Values for which to take the mean
+                      psVector *errors, // Errors in the values
+                      psVector *masks   // Masks for the values, 0 = don't use, 1 = use
     );
 
 // Get the median for a bunch of values
 float stacCombineMedian(psVector *values, // Values for which to take the median
-			psVector *errors, // Errors in the values
-			psVector *masks	// Masks for the values, 0 = don't use, 1 = use
+                        psVector *errors, // Errors in the values
+                        psVector *masks // Masks for the values, 0 = don't use, 1 = use
     );
 
 // Combine the transformed images
-bool stacCombine(psImage **combined,	// The combined image for output
-		 psArray **rejected,	// Array of rejection masks
-		 psArray *images,	// Array of transformed images
-		 psArray *errors,	// Array of transformed error images
-		 int nReject,		// Number of rejection iterations
-		 psImage *region,	// Region to combine
-		 psVector *saturated,	// Saturation limits for each image
-		 psVector *bad,		// Bad pixel limits for each image
-		 float reject		// Rejection (k-sigma)
+bool stacCombine(psImage **combined,    // The combined image for output
+                 psArray **rejected,    // Array of rejection masks
+                 psArray *images,       // Array of transformed images
+                 psArray *errors,       // Array of transformed error images
+                 int nReject,           // Number of rejection iterations
+                 psImage *region,       // Region to combine
+                 psVector *saturated,   // Saturation limits for each image
+                 psVector *bad,         // Bad pixel limits for each image
+                 float reject           // Rejection (k-sigma)
     );
 
@@ -110,5 +110,5 @@
 // Invert an array of maps
 psArray *stacInvertMaps(const psArray *maps, // Array of maps to invert
-			int outnx, int outny // Size of output image
+                        int outnx, int outny // Size of output image
     );
 
@@ -118,17 +118,17 @@
 
 // Return the relative gradient for a given pixel
-float stacGradient(psImage *image,	// Input for which to measure the gradient
-		   int x, int y		// Coordinates at which to measure the gradient
+float stacGradient(psImage *image,      // Input for which to measure the gradient
+                   int x, int y         // Coordinates at which to measure the gradient
     );
 
 // Transform the rejection masks back to the source frame
-psArray *stacRejection(psArray *inputs,	// Input images
-		       psArray *rejected, // Rejected images
-		       psArray *regions, // Regions of interest
-		       psArray *maps,	// Maps from input to transformed image
-		       psArray *inverseMaps, // Maps from transformed to input image
-		       float frac,	// Fraction of pixel rejected before looking more carefully
-		       float grad,	// Gradient limit for rejection
-		       psArray *names	// Names of original images (only for writing out when TESTING)
+psArray *stacRejection(psArray *inputs, // Input images
+                       psArray *rejected, // Rejected images
+                       psArray *regions, // Regions of interest
+                       psArray *maps,   // Maps from input to transformed image
+                       psArray *inverseMaps, // Maps from transformed to input image
+                       float frac,      // Fraction of pixel rejected before looking more carefully
+                       float grad,      // Gradient limit for rejection
+                       psArray *names   // Names of original images (only for writing out when TESTING)
     );
 
@@ -139,6 +139,6 @@
 // Returns the change in x' and y' for a change in x and y of 1
 bool stacPlaneTransformDeriv(psPlane *out, // Output derivative, assumed already allocated
-			     psPlaneTransform *transform, // The transform for which to obtain the derivative
-			     psPlane *in // The position at which to obtain the derivative
+                             psPlaneTransform *transform, // The transform for which to obtain the derivative
+                             psPlane *in // The position at which to obtain the derivative
     );
 
@@ -146,6 +146,6 @@
 // Basically, uses derivatives of the transformation to work out what pixels in the source might be of interest
 psImage *stacAreaOfInterest(psImage *mask, // Mask that is to be used to determine the area of interest
-			    psPlaneTransform *map, // Map from the mask to the area of interest
-			    int nxOut, int nyOut // Size of the area of interest
+                            psPlaneTransform *map, // Map from the mask to the area of interest
+                            int nxOut, int nyOut // Size of the area of interest
     );
 
@@ -155,8 +155,9 @@
 
 // Calculate the size of the output image
-bool stacSize(int *outnx, int *outny,	// Size of output image (returned)
-	      float *xMapDiff, float *yMapDiff, // Difference applied to maps
-	      const psArray *images,	// Input images
-	      psArray *maps		// Transformation maps
+bool stacSize(int *outnx, int *outny,   // Size of output image (returned)
+              float *xMapDiff, float *yMapDiff, // Difference applied to maps
+              const psVector *xSizes,   // Sizes of images in x
+              const psVector *ySizes,   // Sizes of images in y
+              psArray *maps             // Transformation maps
     );
 
@@ -167,24 +168,24 @@
 // Calculate the background in an image
 float stacBackground(const psImage *image, // Image for which to get the background
-		     int sample		// Sample in increments of this value
+                     int sample         // Sample in increments of this value
     );
 
 
 // Calculate the relative scales and offsets between the images
-bool stacScales(psVector **scalesPtr,	// Scales to return
-		psVector **offsetsPtr,	// Offsets to return
-		const psArray *images,	// Images on which to measure the scales and offsets
-		const char *starFile,	// File containing coordinates to photometer
-		const char *starMapFile, // Map for coodinates to the common output frame
-		float xMapDiff, float yMapDiff, // Difference from the map to apply (due to size difference)
-		float aper		// Aperture to use for photometry (radius)
+bool stacScales(psVector **scalesPtr,   // Scales to return
+                psVector **offsetsPtr,  // Offsets to return
+                const psArray *images,  // Images on which to measure the scales and offsets
+                const char *starFile,   // File containing coordinates to photometer
+                const char *starMapFile, // Map for coodinates to the common output frame
+                float xMapDiff, float yMapDiff, // Difference from the map to apply (due to size difference)
+                float aper              // Aperture to use for photometry (radius)
     );
 
 // Rescale images
-bool stacRescale(psArray *images,	// Images to rescale
-		 psArray *errImages,	// Variance images to rescale
-		 const psImage *mask,	// Mask indicating which pixels to scale
-		 const psVector *scales,// Scales for images
-		 const psVector *offsets // Offsets for images
+bool stacRescale(psArray *images,       // Images to rescale
+                 psArray *errImages,    // Variance images to rescale
+                 const psImage *mask,   // Mask indicating which pixels to scale
+                 const psVector *scales,// Scales for images
+                 const psVector *offsets // Offsets for images
     );
 
@@ -196,11 +197,11 @@
 
 // Write map out
-bool stacWriteMap(const char *mapName,	// Filename to write to
-		  psPlaneTransform *map	// Map to write
+bool stacWriteMap(const char *mapName,  // Filename to write to
+                  psPlaneTransform *map // Map to write
     );
 
 // Write multiple maps
 bool stacWriteMaps(const psArray *names, // Filenames of the input images (will add ".map")
-		   const psArray *maps	// Maps to write
+                   const psArray *maps  // Maps to write
     );
 
