Index: trunk/pois/src/pois.h
===================================================================
--- trunk/pois/src/pois.h	(revision 3813)
+++ trunk/pois/src/pois.h	(revision 5717)
@@ -3,5 +3,4 @@
 
 #include "pslib.h"
-#include "poisErrorCodes.h"
 
 #define abs(x) ((x) >= 0 ? (x) : (-(x)))
@@ -21,5 +20,5 @@
     int nsx, nsy;			// Number of stamps in x and y
     float refSat, inSat;		// Saturation values for reference and input images
-    float bad;				// Value below which pixels are bad
+    float refBad, inBad;		// Bad values for reference and input images
     float background;			// Value to add to the background in images to get above zero
     int spatialOrder;			// Order of spatial variations in the kernel
@@ -27,4 +26,7 @@
     float sigmaRej;			// Limit (in std dev) for rejection
     float penalty;			// Penalty value
+    char *stampFile;			// Filename for file with stamps
+    bool reverse;			// Reverse the subtraction?
+    bool mask;				// Output the mask?
 } poisConfig;
 
@@ -64,4 +66,11 @@
 void poisStampFree(poisStamp *stamp);
 
+// Return true if the stamp is OK
+bool poisCheckStamp(const psImage *image, // Image to check for threshold
+		    const psImage *mask, // Mask to check for bad pixels
+		    int x, int y,	// Pixel coordinates
+		    const poisConfig *config // Configuration
+    );
+
 /************************************************************************************************************/
 
@@ -78,9 +87,7 @@
 
 // Print usage information
-//void help(void);
+void help(void);
 
 // Parse the command line arguments
-poisConfig *restrict poisConfigAlloc(void);
-
 poisConfig *poisParseConfig(int argc,	// Number of command-line arguments
 			    char **argv	// Command-line arguments
@@ -111,5 +118,5 @@
 
 // Find stamps
-psArray *poisFindStamps(psArray *stampsIO, // Existing list of stamps, or NULL
+psArray *poisFindStamps(psArray *stamps, // Existing list of stamps, or NULL
 			const psImage *image, // Image for which to find stamps
 			const psImage *mask, // Mask image
@@ -158,5 +165,5 @@
 
 // Calculate deviations from the best fit for the stamps
-psVector *poisCalculateDeviations(psVector *deviationsIO, // Output array of deviations, or NULL
+psVector *poisCalculateDeviations(psVector *deviations,	// Output array of deviations, or NULL
 				  psArray *stamps, // Array of stamps
 				  psImage *refImage, // Reference image
@@ -173,8 +180,8 @@
 
 // Reject stamps, based on the deviations
-psList *restrict poisRejectStamps(psArray *stamps,	// Array of stamps
-				  psImage *mask,	// Mask image
-				  const psVector *deviations, // Vector of deviations for the stamps
-				  const poisConfig *config // Configuration
+bool poisRejectStamps(psArray *stamps,	// Array of stamps
+		      psImage *mask,	// Mask image
+		      const psVector *deviations, // Vector of deviations for the stamps
+		      const poisConfig *config // Configuration
     );
 
@@ -184,5 +191,5 @@
 
 // Solve the matrix equation
-psVector *poisSolveEquation(psVector *solutionIO,	// Solution vector, or NULL
+psVector *poisSolveEquation(psVector *solution,	// Solution vector, or NULL
 			    const psArray *stamps, // Array of stamps
 			    const poisConfig *config
@@ -203,14 +210,25 @@
 /************************************************************************************************************/
 
-psImage *poisImageSetVal(psImage *restrict IO,	     // Input image
-			 const psC64 val	     // set to this value
-    );
-
-psImage *poisImageSetValInMask(psImage *IO,			// Image to update, or NULL
-			       const psImage *restrict in,	// Input image
-			       const psImage *mask,		// mask for image
-			       const psC64 val,			// set to this value
-			       const unsigned long bits		// set pixels where mask & bits != 0
-    );
+// poisReadStamps.c
+
+// Read stamps from a file
+psArray *poisReadStamps(psArray *stamps,// Stamps
+			FILE **stampFP, // File pointer for stamps file
+			const psImage *image, // Image for which to find stamps
+			const psImage *mask, // Mask image
+			const poisConfig *config // Configuration
+    );
+
+/************************************************************************************************************/
+
+// poisCheckKernel.c
+
+// Check kernel for power at large radii
+bool poisCheckKernel(const psVector *solution,// Kernel solution
+		     const psArray *kernels, // Kernel basis functions
+		     const poisConfig *config // Configuration
+    );
+
+/************************************************************************************************************/
 
 #endif
