Index: /trunk/psModules/src/pmImageSubtract.c
===================================================================
--- /trunk/psModules/src/pmImageSubtract.c	(revision 4097)
+++ /trunk/psModules/src/pmImageSubtract.c	(revision 4098)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-05-31 21:25:09 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-03 21:43:42 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -282,5 +282,5 @@
 
                                         // Compute the value of the kernel at location (u, v):
-                                        psF32 exponent = (PS_SQR(uScaled) * PS_SQR(vScaled)) /
+                                        psF32 exponent = (PS_SQR(uScaled) + PS_SQR(vScaled)) /
                                                          (2.0 * PS_SQR(sigmas->data.F32[sigPtr]));
                                         currPreCalc->data.F32[v+size][u+size] =
@@ -334,4 +334,8 @@
     PS_ASSERT_INT_POSITIVE(yNum, NULL);
     PS_ASSERT_INT_POSITIVE(border, NULL);
+    PS_ASSERT_INT_LARGER_THAN(image->numCols, xNum, NULL);
+    PS_ASSERT_INT_LARGER_THAN(image->numRows, yNum, NULL);
+    PS_ASSERT_INT_LARGER_THAN(image->numCols, (2 * border), NULL);
+    PS_ASSERT_INT_LARGER_THAN(image->numRows, (2 * border), NULL);
 
     if (stamps != NULL) {
@@ -375,5 +379,5 @@
                 //
                 // The following nested loop iterates over every pixel in the mask
-                // associated with this (i, j).  It ignores over pixels within a
+                // associated with this (i, j).  It ignores pixels within a
                 // border of pixels from the image edge.
                 //
Index: /trunk/psModules/test/Makefile.am
===================================================================
--- /trunk/psModules/test/Makefile.am	(revision 4097)
+++ /trunk/psModules/test/Makefile.am	(revision 4098)
@@ -10,4 +10,5 @@
 	tst_pmReadoutCombine \
 	tst_pmSubtractSky \
+	tst_pmImageSubtract \
 	tst_pmObjects01
 
@@ -28,4 +29,5 @@
 tst_pmReadoutCombine_SOURCES = tst_pmReadoutCombine.c
 tst_pmSubtractSky_SOURCES = tst_pmSubtractSky.c
+tst_pmImageSubtract_SOURCES = tst_pmImageSubtract.c
 tst_pmObjects01_SOURCES = tst_pmObjects01.c
 
