Index: trunk/psModules/src/imcombine/pmSubtractionStamps.h
===================================================================
--- trunk/psModules/src/imcombine/pmSubtractionStamps.h	(revision 15443)
+++ trunk/psModules/src/imcombine/pmSubtractionStamps.h	(revision 15756)
@@ -23,4 +23,5 @@
     psArray *x, *y;                     ///< Coordinates for possible stamps (or NULL)
     psArray *flux;                      ///< Fluxes for possible stamps (or NULL)
+    int footprint;                      ///< Half-size of stamps
 } pmSubtractionStampList;
 
@@ -29,4 +30,5 @@
                                                     int numRows, // Number of rows in image
                                                     const psRegion *region, // Region for stamps, or NULL
+                                                    int footprint, // Half-size of stamps
                                                     float spacing // Rough average spacing between stamps
     );
@@ -40,4 +42,5 @@
     PS_ASSERT_ARRAY_SIZE((LIST)->stamps, (LIST)->num, RETURNVALUE); \
     PS_ASSERT_ARRAY_SIZE((LIST)->regions, (LIST)->num, RETURNVALUE); \
+    PS_ASSERT_INT_NONNEGATIVE((LIST)->footprint, RETURNVALUE); \
     if ((LIST)->x || (LIST)->y || (LIST)->flux) { \
         PS_ASSERT_ARRAY_NON_NULL((LIST)->x, RETURNVALUE); \
@@ -57,9 +60,10 @@
     psKernel *image1;                   ///< Reference image postage stamp
     psKernel *image2;                   ///< Input image postage stamp
-    psKernel *weight;                   ///< Weight image postage stamp
-    psArray *convolutions1;             ///< Convolutions of image 1 for each kernel component
-    psArray *convolutions2;             ///< Convolutions of image 2 for each kernel component
-    psImage *matrix;                    ///< Associated matrix
-    psVector *vector;                   ///< Assoicated vector
+    psKernel *weight;                   ///< Weight image postage stamp, or NULL
+    psArray *convolutions1;             ///< Convolutions of image 1 for each kernel component, or NULL
+    psArray *convolutions2;             ///< Convolutions of image 2 for each kernel component, or NULL
+    psImage *matrix1, *matrix2;         ///< Matrices for each image, or NULL
+    psImage *matrixX;                   ///< Cross-matrix (for mode DUAL), or NULL
+    psVector *vector;                   ///< Associated vector (when mode not DUAL), or NULL
     pmSubtractionStampStatus status;    ///< Status of stamp
 } pmSubtractionStamp;
@@ -74,4 +78,5 @@
                                                 const psRegion *region, ///< Region to search, or NULL
                                                 float threshold, ///< Threshold for stamps in the image
+                                                int footprint, ///< Half-size for stamps
                                                 float spacing, ///< Rough spacing for stamps
                                                 pmSubtractionMode mode ///< Mode for subtraction
@@ -85,4 +90,5 @@
                                                const psImage *mask, ///< Mask, or NULL
                                                const psRegion *region, ///< Region to search, or NULL
+                                               int footprint, ///< Half-size for stamps
                                                float spacing, ///< Rough spacing for stamps
                                                pmSubtractionMode mode ///< Mode for subtraction
@@ -94,4 +100,5 @@
     const psImage *subMask,             ///< Mask, or NULL
     const psRegion *region,             ///< Region to search, or NULL
+    int footprint,                      ///< Half-size for stamps
     float spacing,                      ///< Rough spacing for stamps
     pmSubtractionMode mode              ///< Mode for subtraction
@@ -103,4 +110,5 @@
     const psImage *subMask,             ///< Mask, or NULL
     const psRegion *region,             ///< Region to search, or NULL
+    int footprint,                      ///< Half-size for stamps
     float spacing,                      ///< Rough spacing for stamps
     pmSubtractionMode mode              ///< Mode for subtraction
@@ -109,8 +117,7 @@
 /// Extract stamps from the images
 bool pmSubtractionStampsExtract(pmSubtractionStampList *stamps, ///< Stamps
-                                psImage *reference, ///< Reference image
-                                psImage *input, ///< Input image (or NULL)
+                                psImage *image1, ///< Reference image
+                                psImage *image2, ///< Input image (or NULL)
                                 psImage *weight, ///< Weight (variance) map
-                                int footprint, ///< Stamp footprint size
                                 int kernelSize ///< Kernel half-size
     );
