Index: trunk/stac/src/stac.h
===================================================================
--- trunk/stac/src/stac.h	(revision 3660)
+++ trunk/stac/src/stac.h	(revision 3666)
@@ -13,48 +13,9 @@
 /************************************************************************************************************/
 
-// stacConfig.c
-
-// Configuration options
-typedef struct {
-    int verbose;			// Verbosity level
-    float gain, readnoise;		// Gain and readnoise for detectors
-    psArray *inputs;			// Input file names
-    const char *output;			// Output file name
-    bool saveShifts;			// Save shifted images?
-    const char *starFile;		// File with star coordinates
-    const char *starMapFile;		// File with map for stars
-    int outnx, outny;			// Size of output image
-    float xOffset, yOffset;		// Offset to get lower-left corner at 0,0
-    psVector *saturated;		// Saturation level for each image
-    psVector *bad;			// Bad level for each image
-    float reject;			// Rejection level
-    float frac;				// Fraction of input pixel that must be masked before the pixel is
-					// considered bad
-    float grad;				// Multiplier of the gradient
-    int nReject;			// Number of rejection iterations
-    float xMapDiff, yMapDiff;		// Difference between pure map and output image coordinates
-    float aper;				// Aperture size (pixels)
-} stacConfig;
-
-// Allocator
-stacConfig *stacConfigAlloc(void);
-// Deallocator
-void stacConfigFree(stacConfig *config);
-
-// Help message
-void help(const char *name);
-
-// Parse the command line and return config
-stacConfig *stacParseConfig(int argc,	// Number of command-line arguments
-			    char **argv // Command-line arguments
-    );
-
-
-/************************************************************************************************************/
-
 // stacRead.c
 
 // Read the input files and return an array of images
-psArray *stacReadImages(stacConfig *config);
+psArray *stacReadImages(psArray *filenames // The file names of the images
+    );
 
 // Read a file of coordinates (x,y)
@@ -65,5 +26,6 @@
 
 // Read the map files and return an array of transformations
-psArray *stacReadMaps(stacConfig *config);
+psArray *stacReadMaps(psArray *filenames // The file names of the images whose maps are to be read
+    );
 
 /************************************************************************************************************/
@@ -73,5 +35,6 @@
 // Calculate the error images
 psArray *stacErrorImages(psArray *inputs, // Array of input images
-			 stacConfig *config // Configuration details
+			 float gain,	// Gain, in e/ADU
+			 float rn	// Read noise, in e
     );
 
@@ -90,5 +53,5 @@
 		   const psVector *scales, // Relative scales
 		   const psVector *offsets, // Relative offsets
-		   const stacConfig *config // Configuration
+		   int outnx, int outny	// Size of output images
     );
 
@@ -133,5 +96,7 @@
 		 int nReject,		// Number of rejection iterations
 		 psImage *region,	// Region to combine
-		 stacConfig *config	// Configuration
+		 psVector *saturated,	// Saturation limits for each image
+		 psVector *bad,		// Bad pixel limits for each image
+		 float reject		// Rejection (k-sigma)
     );
 
@@ -142,7 +107,6 @@
 // Invert an array of maps
 psArray *stacInvertMaps(const psArray *maps, // Array of maps to invert
-			const stacConfig *config // Configuration
-    );
-
+			int outnx, int outny // Size of output image
+    );
 
 /************************************************************************************************************/
@@ -161,5 +125,7 @@
 		       psArray *maps,	// Maps from input to transformed image
 		       psArray *inverseMaps, // Maps from transformed to input image
-		       stacConfig *config // Configuration
+		       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)
     );
 
@@ -186,9 +152,9 @@
 
 // Calculate the size of the output image
-bool stacSize(stacConfig *config,	// Configuration, containing the output size
+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
     );
-
 
 /************************************************************************************************************/
@@ -206,5 +172,8 @@
 		psVector **offsetsPtr,	// Offsets to return
 		const psArray *images,	// Images on which to measure the scales and offsets
-		const stacConfig *config // Configuration
+		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)
     );
 
@@ -224,6 +193,6 @@
 
 // Write maps out
-bool stacWriteMaps(const psArray *maps,	// Maps to write
-		   const stacConfig *config // Configuration
+bool stacWriteMap(const char *mapName,	// Filename to write to
+		  psPlaneTransform *map	// Map to write
     );
 
