Index: /trunk/psModules/test/Makefile.am
===================================================================
--- /trunk/psModules/test/Makefile.am	(revision 2130)
+++ /trunk/psModules/test/Makefile.am	(revision 2131)
@@ -1,3 +1,3 @@
-bin_PROGRAMS = tst_pmFlatField tst_pmMaskBadPixels tst_pmNonLinear
+bin_PROGRAMS = tst_pmFlatField tst_pmMaskBadPixels tst_pmNonLinear tst_pmSubtractBias
 
 tst_pmFlatField_SOURCES = tst_pmFlatField.c
@@ -9,2 +9,6 @@
 tst_pmNonLinear_SOURCES = tst_pmNonLinear.c
 tst_pmNonLinear_LDFLAGS = -L../src -lpsmodule
+
+tst_pmSubtractBias_SOURCES = tst_pmSubtractBias.c
+tst_pmSubtractBias_LDFLAGS = -L../src -lpsmodule
+
Index: /trunk/psModules/test/Makefile_NonLinear
===================================================================
--- /trunk/psModules/test/Makefile_NonLinear	(revision 2130)
+++ /trunk/psModules/test/Makefile_NonLinear	(revision 2131)
@@ -3,5 +3,4 @@
 #	tst_pmNonLinear.c test program.  Usage
 #		make -f Makefile_NonLinear
-#
 
 CFLAGS = -g -O2 -g2 -Wall -std=c99 -D_GNU_SOURCE
Index: /trunk/psModules/test/tst_pmSubtractBias.c
===================================================================
--- /trunk/psModules/test/tst_pmSubtractBias.c	(revision 2131)
+++ /trunk/psModules/test/tst_pmSubtractBias.c	(revision 2131)
@@ -0,0 +1,84 @@
+/** @file tst_pmFlatField.c
+ *
+ *  @brief Contains the tests for pmSubtractBias.c:
+ *
+ * test00: This code will ...
+ *
+ *  @author GLG, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 21:49:58 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
+
+#include "psTest.h"
+#include "pslib.h"
+#include "pmSubtractBias.h"
+static int test00(void);
+testDescription tests[] = {
+                              {test00, 000, "pmSubtractBias", 0, false},
+                              {NULL}
+                          };
+
+
+int main(int argc, char* argv[])
+{
+    return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
+}
+
+#define NUM_ROWS 8
+#define NUM_COLS 8
+int doSubtractBiasFullFrame(int numCols, int numRows)
+{
+    int i;
+    int j;
+    float actual;
+    float expect;
+    int testStatus = 0;
+    psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32);
+    psReadout *myReadout = psReadoutAlloc(numCols, numRows, myImage);
+    psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32);
+    psReadout *myBias = psReadoutAlloc(numCols, numRows, myImage);
+
+    for (i=0;i<numRows;i++) {
+        for (j=0;j<numCols;j++) {
+            myReadout->image->data.F32[i][j] = (float) (i + j);
+            myBias->image->data.F32[i][j] = 1.0;
+        }
+    }
+
+    printPositiveTestHeader(stdout, "pmSubtractBias", "Full Bias Frame");
+
+    myReadout = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, NULL,
+                               0, NULL, myBias);
+
+    for (i=0;i<numRows;i++) {
+        for (j=0;j<numCols;j++) {
+            expect = ((float) (i + j)) - 1.0;
+            actual = myReadout->image->data.F32[i][j];
+            if (FLT_EPSILON < fabs(expect - actual)) {
+                printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
+                testStatus = 1;
+            }
+        }
+    }
+
+
+    psFree(myReadout);
+    psFree(myBias);
+    printFooter(stdout, "pmSubtractBias", "Full Bias Frame", true);
+    return(testStatus);
+}
+
+int test00( void )
+{
+    int testStatus = 0;
+
+    //    testStatus |= doNonLinearityPolynomialTest(1, 1);
+    //    testStatus |= doNonLinearityPolynomialTest(NUM_COLS, 1);
+    //    testStatus |= doNonLinearityPolynomialTest(1, NUM_ROWS);
+    testStatus |= doNonLinearityPolynomialTest(NUM_COLS, NUM_ROWS);
+
+    return(testStatus);
+}
