Index: trunk/psModules/test/tst_pmNonLinear.c
===================================================================
--- trunk/psModules/test/tst_pmNonLinear.c	(revision 2857)
+++ trunk/psModules/test/tst_pmNonLinear.c	(revision 2915)
@@ -11,8 +11,11 @@
  * N), (N, 1), (N, N)].  
  *
+ * test02, test03: This code tests the functions with various unallowable
+ * input parameters (NULLS) and incorrect vector sizes.
+ *
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-30 22:22:00 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-05 23:25:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,7 +27,11 @@
 static int test00(void);
 static int test01(void);
+static int test02(void);
+static int test03(void);
 testDescription tests[] = {
-                              {test00, 000, "pmNonLinearityPolynomial", 0, false},
-                              {test01, 000, "pmNonLinearityLookup", 0, false},
+                              {test00, 000, "pmNonLinearityPolynomial", true, false},
+                              {test01, 000, "pmNonLinearityLookup", true, false},
+                              {test02, 000, "pmNonLinearityPolynomial(): error/warning conditions", true, false},
+                              {test03, 000, "pmNonLinearityLookup(): error/warning conditions", true, false},
                               {NULL}
                           };
@@ -44,7 +51,6 @@
     float actual;
     float expect;
-    int testStatus = 0;
+    int testStatus = true;
     psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32);
-    //    psReadout *myReadout = psReadoutAlloc(numCols, numRows, myImage);
     psReadout *myReadout = psReadoutAlloc();
     myReadout->image = myImage;
@@ -64,6 +70,6 @@
             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;
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
+                testStatus = false;
             }
         }
@@ -94,8 +100,7 @@
     float actual;
     float expect;
-    int testStatus = 0;
+    int testStatus = true;
     int tableSize = PS_MAX(numCols, numRows)*2;
     psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32);
-    //    psReadout *myReadout = psReadoutAlloc(numCols, numRows, myImage);
     psReadout *myReadout = psReadoutAlloc();
     myReadout->image = myImage;
@@ -120,6 +125,6 @@
             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;
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
+                testStatus = false;
             }
         }
@@ -144,2 +149,231 @@
     return(testStatus);
 }
+
+int test02( void )
+{
+    int i;
+    int j;
+    int testStatus = true;
+    psImage *myImage = psImageAlloc(NUM_COLS, NUM_ROWS, PS_TYPE_F32);
+    psReadout *myReadout = psReadoutAlloc();
+    psReadout *rc = NULL;
+    myReadout->image = myImage;
+    psPolynomial1D *myPoly = psPolynomial1DAlloc(2, PS_POLYNOMIAL_ORD);
+    myPoly->coeff[1] = 1.0;
+
+    for (i=0;i<NUM_ROWS;i++) {
+        for (j=0;j<NUM_COLS;j++) {
+            myReadout->image->data.F32[i][j] = (float) (i + j);
+        }
+    }
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityPolynomial() with NULL input readout.  Should generate error, return NULL.\n");
+    rc = pmNonLinearityPolynomial(NULL, myPoly);
+    if (rc != NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityPolynomial() with NULL input readout->image.  Should generate error, return NULL.\n");
+    psImage *tmpImage = myReadout->image;
+    myReadout->image = NULL;
+    rc = pmNonLinearityPolynomial(myReadout, myPoly);
+    if (rc != NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+    myReadout->image = tmpImage;
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityPolynomial() with NULL polynomial.  Should generate error, return NULL.\n");
+    rc = pmNonLinearityPolynomial(myReadout, NULL);
+    if (rc != NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+
+    psFree(myReadout);
+    psFree(myPoly);
+    return(testStatus);
+}
+
+
+int test03Init(psReadout *myReadout)
+{
+    for (psS32 i=0;i<NUM_ROWS;i++) {
+        for (psS32 j=0;j<NUM_COLS;j++) {
+            myReadout->image->data.F32[i][j] = (float) (i + j);
+        }
+    }
+    return(0);
+}
+
+int test03()
+{
+    int i;
+    int j;
+    int testStatus = true;
+    int tableSize = PS_MAX(NUM_COLS, NUM_ROWS)*3;
+    psImage *myImage = psImageAlloc(NUM_COLS, NUM_ROWS, PS_TYPE_F32);
+    psReadout *myReadout = psReadoutAlloc();
+    psReadout *rc = NULL;
+    myReadout->image = myImage;
+    psVector *in = psVectorAlloc(tableSize, PS_TYPE_F32);
+    psVector *inOne = psVectorAlloc(1, PS_TYPE_F32);
+    psVector *inSmall = psVectorAlloc(tableSize-1, PS_TYPE_F32);
+    psVector *inBig = psVectorAlloc(tableSize+1, PS_TYPE_F32);
+    psVector *out = psVectorAlloc(tableSize, PS_TYPE_F32);
+    psVector *outOne = psVectorAlloc(1, PS_TYPE_F32);
+    psVector *outSmall = psVectorAlloc(tableSize-1, PS_TYPE_F32);
+    psVector *outBig = psVectorAlloc(tableSize+1, PS_TYPE_F32);
+
+    test03Init(myReadout);
+    for (i=0;i<tableSize;i++) {
+        in->data.F32[i] = (float) i;
+        out->data.F32[i] = (float) (2 * i);
+        inBig->data.F32[i] = (float) i;
+        outBig->data.F32[i] = (float) (2 * i);
+        if (i < tableSize-1) {
+            inSmall->data.F32[i] = (float) (2 * i);
+            outSmall->data.F32[i] = (float) (2 * i);
+        }
+    }
+    inBig->data.F32[tableSize] = (float) tableSize;
+    outBig->data.F32[tableSize] = (float) (2 * tableSize);
+    inOne->data.F32[0] = 0.0;
+    outOne->data.F32[0] = 0.0;
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with NULL input psReadout.  Should generate error, return NULL.\n");
+    rc = pmNonLinearityLookup(NULL, in, out);
+    if (rc != NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with NULL input psReadout->image.  Should generate error, return NULL.\n");
+    psImage *tmpImage = myReadout->image;
+    myReadout->image = NULL;
+    rc = pmNonLinearityLookup(myReadout, in, out);
+    if (rc != NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+    myReadout->image = tmpImage;
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with NULL inFlux psVector.  Should generate error, return NULL.\n");
+    rc = pmNonLinearityLookup(myReadout, NULL, out);
+    if (rc != NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with NULL outFlux psVector.  Should generate error, return NULL.\n");
+    rc = pmNonLinearityLookup(myReadout, in, NULL);
+    if (rc != NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+
+    test03Init(myReadout);
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with size difference in inFlux/outFLux psVectors.  Should generate warning.\n");
+    rc = pmNonLinearityLookup(myReadout, in, outBig);
+    if (rc == NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n");
+        testStatus = false;
+    }
+    for (i=0;i<NUM_ROWS;i++) {
+        for (j=0;j<NUM_COLS;j++) {
+            psF32 expect = (float) (2 * (i + j));
+            psF32 actual = rc->image->data.F32[i][j];
+            if (FLT_EPSILON < fabs(expect - actual)) {
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
+                testStatus = false;
+            }
+        }
+    }
+
+
+    test03Init(myReadout);
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with size difference in inFlux/outFLux psVectors.  Should generate warning.\n");
+    rc = pmNonLinearityLookup(myReadout, in, outSmall);
+    if (rc == NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n");
+        testStatus = false;
+    }
+
+    test03Init(myReadout);
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with size difference in inFlux/outFLux psVectors.  Should generate warning.\n");
+    rc = pmNonLinearityLookup(myReadout, inSmall, out);
+    if (rc == NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n");
+        testStatus = false;
+    }
+
+    test03Init(myReadout);
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with size difference in inFlux/outFLux psVectors.  Should generate warning.\n");
+    rc = pmNonLinearityLookup(myReadout, inBig, out);
+    if (rc == NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n");
+        testStatus = false;
+    }
+
+    test03Init(myReadout);
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with size difference in inFlux/outFLux psVectors.  Should generate warning.\n");
+    rc = pmNonLinearityLookup(myReadout, inSmall, outBig);
+    if (rc == NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n");
+        testStatus = false;
+    }
+
+    test03Init(myReadout);
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with size difference in inFlux/outFLux psVectors.  Should generate warning.\n");
+    rc = pmNonLinearityLookup(myReadout, inBig, outSmall);
+    if (rc == NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n");
+        testStatus = false;
+    }
+
+    test03Init(myReadout);
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with inFlux psVector size 1.  Should generate error, return original psReadout.\n");
+    rc = pmNonLinearityLookup(myReadout, inOne, out);
+    if (rc != myReadout) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() did not return the original psReadout\n");
+        testStatus = false;
+    }
+
+    printf("------------------------------------------------------------\n");
+    printf("Calling pmNonLinearityLookup() with one pixels outside inFlux range.  Should generate warnings.\n");
+    test03Init(myReadout);
+    myReadout->image->data.F32[0][0] = -1;
+    rc = pmNonLinearityLookup(myReadout, in, out);
+    if (rc == NULL) {
+        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n");
+        testStatus = false;
+    }
+
+
+    psFree(myReadout);
+    psFree(in);
+    psFree(inOne);
+    psFree(inSmall);
+    psFree(inBig);
+    psFree(out);
+    psFree(outOne);
+    psFree(outSmall);
+    psFree(outBig);
+
+    return(testStatus);
+}
Index: trunk/psModules/test/tst_pmReadoutCombine.c
===================================================================
--- trunk/psModules/test/tst_pmReadoutCombine.c	(revision 2857)
+++ trunk/psModules/test/tst_pmReadoutCombine.c	(revision 2915)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-30 21:35:04 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-05 23:25:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -44,5 +44,5 @@
         for (psS32 j = 0 ; j < output->numCols ; j++) {
             if (output->data.F32[i][j] != expect) {
-                printf("ERROR: output[%d][%d] is %.2f, should be %f\n", i, j, output->data.F32[i][j], expect);
+                printf("TEST ERROR: output[%d][%d] is %.2f, should be %f\n", i, j, output->data.F32[i][j], expect);
                 testStatus = false;
             }
@@ -261,10 +261,10 @@
 
         if (rc->type.type != scale->type.type) {
-            printf("ERROR: output readout->image has incorrect type.\n");
+            printf("TEST ERROR: output readout->image has incorrect type.\n");
             testStatus = false;
         }
         psFree(rc);
     } else {
-        printf("ERROR: pmReadoutCombine() returned NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
         testStatus = false;
 
@@ -275,5 +275,5 @@
     rc = pmReadoutCombine(NULL, list, params, zeroHalf, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -283,5 +283,5 @@
     rc = pmReadoutCombine(NULL, list, params, zeroF64, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -300,5 +300,5 @@
         rc = NULL;
     } else {
-        printf("ERROR: pmReadoutCombine() returned NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
         testStatus = false;
     }
@@ -316,10 +316,10 @@
 
         if (rc->type.type != scale->type.type) {
-            printf("ERROR: output readout->image has incorrect type.\n");
+            printf("TEST ERROR: output readout->image has incorrect type.\n");
             testStatus = false;
         }
         psFree(rc);
     } else {
-        printf("ERROR: pmReadoutCombine() returned NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
         testStatus = false;
 
@@ -330,5 +330,5 @@
     rc = pmReadoutCombine(output, list, params, zero, scaleHalf, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -338,5 +338,5 @@
     rc = pmReadoutCombine(output, list, params, zero, scaleF64, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -355,5 +355,5 @@
         rc = NULL;
     } else {
-        printf("ERROR: pmReadoutCombine() returned NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() returned NULL\n");
         testStatus = false;
     }
@@ -364,5 +364,5 @@
     rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -377,5 +377,5 @@
     rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -387,5 +387,5 @@
     rc = pmReadoutCombine(output, NULL, params, zero, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -395,5 +395,5 @@
     rc = pmReadoutCombine(output, list, NULL, zero, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -404,5 +404,5 @@
     rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
@@ -412,7 +412,8 @@
     psStats *oldStats = params->stats;
     printf("Calling pmReadoutCombine() with NULL param->stats.  Should generate error, return NULL.\n");
+    params->stats = NULL;
     rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
     if (rc != NULL) {
-        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        printf("TEST ERROR: pmReadoutCombine() did not return NULL\n");
         testStatus = false;
     }
Index: trunk/psModules/test/tst_pmSubtractBias.c
===================================================================
--- trunk/psModules/test/tst_pmSubtractBias.c	(revision 2857)
+++ trunk/psModules/test/tst_pmSubtractBias.c	(revision 2915)
@@ -13,6 +13,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-30 21:35:04 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-05 23:25:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -82,5 +82,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -150,5 +150,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -223,5 +223,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -285,5 +285,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -351,5 +351,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -431,5 +431,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -505,5 +505,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -614,5 +614,5 @@
     rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ALL, stat, 0, PM_FIT_NONE, NULL);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
     }
@@ -622,5 +622,5 @@
     rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_ROWS, stat, 0, PM_FIT_NONE, NULL);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
         psFree(rc);
@@ -631,5 +631,5 @@
     rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_COLUMNS, stat, 0, PM_FIT_NONE, NULL);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
         psFree(rc);
@@ -645,5 +645,5 @@
             psF32 actual = rc->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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -664,5 +664,5 @@
             psF32 actual = rc->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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -681,5 +681,5 @@
             psF32 actual = rc->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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -695,5 +695,5 @@
     rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat, 0, PM_FIT_SPLINE, myBias);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
         psFree(rc);
@@ -705,5 +705,5 @@
             psF32 actual = rc->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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -725,5 +725,5 @@
             psF32 actual = rc->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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
@@ -742,5 +742,5 @@
                 psF32 actual = rc->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);
+                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                     testStatus = 1;
                 }
@@ -759,5 +759,5 @@
                 psF32 actual = rc->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);
+                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                     testStatus = 1;
                 }
@@ -771,5 +771,5 @@
                                0, PM_FIT_NONE, myBiasShortRows);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
         psFree(rc);
@@ -782,5 +782,5 @@
                                0, PM_FIT_NONE, myBiasShortCols);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
         psFree(rc);
@@ -792,5 +792,5 @@
                                0, 54321, NULL);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
         psFree(rc);
@@ -802,5 +802,5 @@
                                0, PM_FIT_NONE, NULL);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractBias() did not return input psReadout.\n");
+        printf("TEST ERROR: pmSubtractBias() did not return input psReadout.\n");
         testStatus = false;
         psFree(rc);
@@ -813,5 +813,5 @@
                 psF32 actual = rc->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);
+                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                     testStatus = 1;
                 }
@@ -921,5 +921,5 @@
             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);
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
                 testStatus = 1;
             }
Index: trunk/psModules/test/tst_pmSubtractSky.c
===================================================================
--- trunk/psModules/test/tst_pmSubtractSky.c	(revision 2857)
+++ trunk/psModules/test/tst_pmSubtractSky.c	(revision 2915)
@@ -7,6 +7,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-30 21:35:04 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-05 23:25:25 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -65,5 +65,5 @@
         for (j=0;j<numCols;j++) {
             if (ERROR_TOLERANCE < fabs(myReadout->image->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j, myReadout->image->data.F32[i][j]);
+                printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j, myReadout->image->data.F32[i][j]);
                 testStatus = 1;
             }
@@ -113,5 +113,5 @@
         for (j=0;j<numCols;j++) {
             if (errorTolerance < fabs(myReadout->image->data.F32[i][j] - trueImage->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be %f\n", i, j,
+                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j,
                        myReadout->image->data.F32[i][j], trueImage->data.F32[i][j]);
                 testStatus = 1;
@@ -201,5 +201,5 @@
     rc = pmSubtractSky(NULL, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
     if (rc != NULL) {
-        printf("ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
+        printf("TEST ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
         testStatus = false;
     }
@@ -210,5 +210,5 @@
     rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
     if (rc != NULL) {
-        printf("ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
+        printf("TEST ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
         testStatus = false;
     }
@@ -220,30 +220,30 @@
     rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
     if (rc != NULL) {
-        printf("ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
-        testStatus = false;
-    }
-    myReadout->image = tmpImageF32;
-
-    printf("----------------------------------------------------------------\n");
-    printf("Calling pmSubtractSky() with NULL fitSpec.  Should return image, no ERROR, no WARNING.\n\n");
+        printf("TEST ERROR: pmSubtractSky() returned a non-NULL psReadout\n");
+        testStatus = false;
+    }
+    myReadout->image = tmpImageF32;
+
+    printf("----------------------------------------------------------------\n");
+    printf("Calling pmSubtractSky() with NULL fitSpec.  Should return image, no TEST ERROR, no WARNING.\n\n");
     rc = pmSubtractSky(myReadout, NULL, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractSky() returned something other than psReadout\n");
-        testStatus = false;
-    }
-
-    printf("----------------------------------------------------------------\n");
-    printf("Calling pmSubtractSky() with PM_FIT_NONE fit.  Should return image, no ERROR, no WARNING.\n\n");
+        printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
+        testStatus = false;
+    }
+
+    printf("----------------------------------------------------------------\n");
+    printf("Calling pmSubtractSky() with PM_FIT_NONE fit.  Should return image, no TEST ERROR, no WARNING.\n\n");
     rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_NONE, 1, myStats, 2.0);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractSky() returned something other than psReadout\n");
-        testStatus = false;
-    }
-
-    printf("----------------------------------------------------------------\n");
-    printf("Calling pmSubtractSky() with PM_FIT_SPLINE fit.  Should return image, no ERROR, no WARNING.\n\n");
+        printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
+        testStatus = false;
+    }
+
+    printf("----------------------------------------------------------------\n");
+    printf("Calling pmSubtractSky() with PM_FIT_SPLINE fit.  Should return image, no TEST ERROR, no WARNING.\n\n");
     rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_SPLINE, 1, myStats, 2.0);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractSky() returned something other than psReadout\n");
+        printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
         testStatus = false;
     }
@@ -255,5 +255,5 @@
         for (j=0;j<NUM_COLS_SMALL;j++) {
             if (ERROR_TOLERANCE < fabs(rc->image->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
+                printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
                        rc->image->data.F32[i][j]);
                 testStatus = false;
@@ -270,5 +270,5 @@
         for (j=0;j<NUM_COLS_SMALL;j++) {
             if (ERROR_TOLERANCE < fabs(rc->image->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
+                printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
                        rc->image->data.F32[i][j]);
                 testStatus = false;
@@ -286,5 +286,5 @@
         for (j=0;j<NUM_COLS_SMALL;j++) {
             if (ERROR_TOLERANCE < fabs(rc->image->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
+                printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
                        rc->image->data.F32[i][j]);
                 testStatus = false;
@@ -300,5 +300,5 @@
         for (j=0;j<NUM_COLS_SMALL;j++) {
             if (ERROR_TOLERANCE < fabs(rc->image->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
+                printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
                        rc->image->data.F32[i][j]);
                 testStatus = false;
@@ -313,5 +313,5 @@
         for (j=0;j<NUM_COLS_SMALL;j++) {
             if (ERROR_TOLERANCE < fabs(rc->image->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
+                printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
                        rc->image->data.F32[i][j]);
                 testStatus = false;
@@ -326,5 +326,5 @@
         for (j=0;j<NUM_COLS_SMALL;j++) {
             if (ERROR_TOLERANCE < fabs(rc->image->data.F32[i][j])) {
-                printf("ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
+                printf("TEST ERROR: image[%d][%d] is %f, should be 0.0\n", i, j,
                        rc->image->data.F32[i][j]);
                 testStatus = false;
@@ -337,5 +337,5 @@
     rc = pmSubtractSky(myReadout, (void *) myPoly, 54321, 1, myStats, -1.0);
     if (rc != myReadout) {
-        printf("ERROR: pmSubtractSky() returned something other than psReadout\n");
+        printf("TEST ERROR: pmSubtractSky() returned something other than psReadout\n");
         testStatus = false;
     }
