Index: trunk/psModules/test/detrend/tst_pmFlatField.c
===================================================================
--- trunk/psModules/test/detrend/tst_pmFlatField.c	(revision 5310)
+++ trunk/psModules/test/detrend/tst_pmFlatField.c	(revision 5435)
@@ -21,6 +21,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:42:52 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -85,12 +85,8 @@
     inReadout->row0 = 0;
     inReadout->col0 = 0;
+    CREATE_AND_SET_IMAGE(inMask, U8, 0, 3,3);
+    inReadout->mask = inMask;
+    PRINT_MATRIX((inReadout->mask),U8,"Input mask:");
     PRINT_MATRIX(inImage,F64,"Input image:");
-
-    CREATE_AND_SET_IMAGE(inMask,U8,0,3,3)
-    pmReadout *inMaskReadout = pmReadoutAlloc(NULL);
-    inMaskReadout->image = inMask;
-    inMaskReadout->row0 = 0;
-    inMaskReadout->col0 = 0;
-    PRINT_MATRIX(inMask,U8,"Input mask:");
 
     CREATE_AND_SET_IMAGE(flatImage1,F64,2.0,3,3)
@@ -101,5 +97,5 @@
     PRINT_MATRIX(flatImage1,F64,"Flat image:");
 
-    if ( !pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( !pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test A - Returned false should be true");
         return 1;
@@ -116,9 +112,9 @@
     PRINT_MATRIX(flatImage2, F64, "Flat image:");
     flatReadout->image = flatImage2;
-    if ( !pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( !pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test B - Returned false should be true");
         return 2;
     }
-    PRINT_MATRIX(inMaskReadout->image, PS_TYPE_MASK_DATA, "Resulting mask:");
+    PRINT_MATRIX(inReadout->mask, PS_TYPE_MASK_DATA, "Resulting mask:");
     PRINT_MATRIX(inImage,F64,"Resulting image:");
     printFooter(stdout, "pmFlatField", "Test B - Mask flat image data", true);
@@ -135,5 +131,5 @@
     psFree(inReadout->mask);
     inReadout->mask = mask1;
-    if ( !pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( !pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test C - Returned false should be true");
         return 3;
@@ -149,5 +145,5 @@
     printNegativeTestHeader(stdout,"pmFlatField", "Test D - Attempt to use null flat readout",
                             "Null not allowed for flat readout", 0);
-    if( pmFlatField(inReadout, inMaskReadout, NULL) ) {
+    if( pmFlatField(inReadout, NULL) ) {
         psError(PS_ERR_UNKNOWN,true,"Test D - Returned true should be false");
         return 4;
@@ -162,9 +158,9 @@
     psImage *temp = inReadout->image;
     inReadout->image = NULL;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test E - Returned true should be false" );
         return 5;
     }
-    inReadout->image = temp;
+    inReadout->image = temp    ;
     printFooter(stdout, "pmFlatField", "Test E - Attempt to use null input image", true);
     printf("\n\n\n");
@@ -176,5 +172,5 @@
     temp = flatReadout->image;
     flatReadout->image = NULL;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test F - Returned true should be false" );
         return 6;
@@ -191,5 +187,5 @@
     temp = flatReadout->image;
     flatReadout->image = smallFlat;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test G - Returned true should be false");
         return 7;
@@ -198,5 +194,4 @@
     printFooter(stdout, "pmFlatField", "Test G - Attempt to use input image bigger than flat image", true);
     printf("\n\n\n");
-
 
     // Test H - Attempt to use input image mask bigger than flat image
@@ -204,14 +199,12 @@
                             "Input image mask size exceeds that of flat image", 0);
     CREATE_AND_SET_IMAGE(largeMask,F64,0.0,5,5);
-    temp = inReadout->mask;
-    inMaskReadout->image = largeMask;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    inReadout->mask = largeMask;
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test H - Returned true should be false");
         return 8;
     }
-    inReadout->mask = temp;
     printFooter(stdout, "pmFlatField", "Test H - Attempt to use input image mask bigger than flat image", true);
     printf("\n\n\n");
-
+    inReadout->mask = mask1;
 
     // Test I - Attempt to use offset greater than input image
@@ -220,5 +213,5 @@
     *(int*)&inReadout->col0 = 50;
     *(int*)&inReadout->row0 = 50;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test I - Returned true should be false");
         return 9;
@@ -234,5 +227,5 @@
                             "Complex types not allowed for input image", 0);
     *(psElemType* ) & inReadout->image->type.type = PS_TYPE_C64;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test J - Returned true should be false");
         return 10;
@@ -247,5 +240,5 @@
                             "Complex types not allowed for flat image", 0);
     *(psElemType* ) & flatReadout->image->type.type = PS_TYPE_C64;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test K - Returned ture should be false");
         return 11;
@@ -260,5 +253,5 @@
                             "Input and flat image types differ", 0);
     *(psElemType* ) & flatReadout->image->type.type = PS_TYPE_F32;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test L - Returned true should be false");
         return 12;
@@ -273,5 +266,5 @@
                             "Mask must be PS_TYPE_MASK type", 0);
     *(psElemType* ) & inReadout->mask->type.type = PS_TYPE_F32;
-    if ( pmFlatField(inReadout, inMaskReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test M - Returned true should be false");
         return 13;
@@ -283,8 +276,4 @@
 
     // Free memory
-    psFree(inMask);
-    psFree(largeMask);
-    inMaskReadout->image = NULL;
-    psFree(inMaskReadout);
     psFree(inReadout);
     psFree(flatReadout);
@@ -293,4 +282,5 @@
     //psFree(flatImage1);
     psFree(smallFlat);
+    psFree(largeMask);
 
     return 0;
Index: trunk/psModules/test/detrend/tst_pmNonLinear.c
===================================================================
--- trunk/psModules/test/detrend/tst_pmNonLinear.c	(revision 5310)
+++ trunk/psModules/test/detrend/tst_pmNonLinear.c	(revision 5435)
@@ -1,3 +1,3 @@
-/** @file tst_pmNonLinear.c
+/* @file tst_pmNonLinear.c
  *
  *  @brief Contains the tests for pmNonLinear.c:
@@ -16,6 +16,9 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:42:52 $
+ *  XXX: Add tests in which the lookup file has incorrect number of entries,
+ *  and where the data is outside the pmReadout range.
+ *
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -37,13 +40,25 @@
                           };
 
-
-int main(int argc, char* argv[])
-{
-    psLogSetFormat("HLNM");
-    return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
-}
-
 #define NUM_ROWS 8
 #define NUM_COLS 8
+#define LOOKUP_FILENAME ".tmp_tst_pmNonLinearLookupFile"
+int main(int argc, char* argv[])
+{
+    psLogSetFormat("HLNM");
+    //
+    // We generate a lookup file for future tests.  We should probably remove
+    // it when we're done.
+    //
+    FILE *fp = fopen(LOOKUP_FILENAME, "w");
+    ;
+    for (psS32 i=0;i<PS_MAX(NUM_COLS, NUM_ROWS)*3;i++) {
+        fprintf(fp, "%f %f\n", (float) i, (float) (2 * i));
+    }
+    fclose(fp);
+
+    //    system("rm LOOKUP_FILENAME");
+    return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
+}
+
 int doNonLinearityPolynomialTest(int numCols, int numRows)
 {
@@ -105,10 +120,7 @@
     float expect;
     int testStatus = true;
-    int tableSize = PS_MAX(numCols, numRows)*2;
     psImage *myImage = psImageAlloc(numCols, numRows, PS_TYPE_F32);
     pmReadout *myReadout = pmReadoutAlloc(NULL);
     myReadout->image = myImage;
-    psVector *in = psVectorAlloc(tableSize, PS_TYPE_F32);
-    psVector *out = psVectorAlloc(tableSize, PS_TYPE_F32);
 
     printPositiveTestHeader(stdout, "pmNonLinear", "doNonLinearityLookupTest");
@@ -119,10 +131,5 @@
     }
 
-    for (i=0;i<tableSize;i++) {
-        in->data.F32[i] = (float) i;
-        out->data.F32[i] = (float) (2 * i);
-    }
-
-    myReadout = pmNonLinearityLookup(myReadout, in, out);
+    myReadout = pmNonLinearityLookup(myReadout, LOOKUP_FILENAME);
     for (i=0;i<numRows;i++) {
         for (j=0;j<numCols;j++) {
@@ -136,8 +143,5 @@
     }
 
-
-    psFree(myReadout);
-    psFree(in);
-    psFree(out);
+    psFree(myReadout);
     printFooter(stdout, "pmNonLinear", "doNonLinearityLookupTest", true);
     return(testStatus);
@@ -220,40 +224,14 @@
 int test03()
 {
-    int i;
-    int j;
-    int testStatus = true;
-    int tableSize = PS_MAX(NUM_COLS, NUM_ROWS)*3;
+    int testStatus = true;
     psImage *myImage = psImageAlloc(NUM_COLS, NUM_ROWS, PS_TYPE_F32);
     pmReadout *myReadout = pmReadoutAlloc(NULL);
     pmReadout *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) 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 pmReadout.  Should generate error, return NULL.\n");
-    rc = pmNonLinearityLookup(NULL, in, out);
+    rc = pmNonLinearityLookup(NULL, LOOKUP_FILENAME);
     if (rc != NULL) {
         printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n");
@@ -265,5 +243,5 @@
     psImage *tmpImage = myReadout->image;
     myReadout->image = NULL;
-    rc = pmNonLinearityLookup(myReadout, in, out);
+    rc = pmNonLinearityLookup(myReadout, LOOKUP_FILENAME);
     if (rc != NULL) {
         printf("TEST ERROR: pmNonLinearityPolynomial() returned a non-NULL pmReadout\n");
@@ -273,237 +251,16 @@
 
     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 pmReadout\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 pmReadout\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);
+    printf("Calling pmNonLinearityLookup() with non-existent lookup file.\n");
+    rc = pmNonLinearityLookup(myReadout, "I_DONT_EXIST");
     if (rc == NULL) {
         printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\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 pmReadout\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, inSmall, out);
-    if (rc == NULL) {
-        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\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, inBig, out);
-    if (rc == NULL) {
-        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\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, inSmall, outBig);
-    if (rc == NULL) {
-        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\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, inBig, outSmall);
-    if (rc == NULL) {
-        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\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 inFlux psVector size 1.  Should generate error, return original pmReadout.\n");
-    rc = pmNonLinearityLookup(myReadout, inOne, out);
-    if (rc != myReadout) {
-        printf("TEST ERROR: pmNonLinearityPolynomial() did not return the original pmReadout\n");
-        testStatus = false;
-    }
-    for (i=0;i<NUM_ROWS;i++) {
-        for (j=0;j<NUM_COLS;j++) {
-            psF32 expect = (float) ((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;
-            }
-        }
-    }
+
 
     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 pmReadout\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(i==0 && j==0) {
-                if(actual != 0.0) {
-                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n",i,j,actual,0.0);
-                }
-            } else {
-                if (FLT_EPSILON < fabs(expect - actual)) {
-                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
-                    testStatus = false;
-                }
-            }
-        }
-    }
-
-    printf("------------------------------------------------------------\n");
-    printf("Calling pmNonLinearityLookup() with one pixels outside inFlux range.  Should generate warnings.\n");
-    test03Init(myReadout);
-    myReadout->image->data.F32[NUM_ROWS-1][NUM_COLS-1] = 100;
-    rc = pmNonLinearityLookup(myReadout, in, out);
-    if (rc == NULL) {
-        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\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(i==(NUM_ROWS-1) && j==(NUM_COLS-1)) {
-                if(actual != (tableSize-1)*2) {
-                    printf("TEST ERROR: image[%d][%d] is %f, should be %f\n",i,j,actual,(tableSize-1)*2.0);
-                }
-            } else {
-                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 image values not in vector.\n");
-    myReadout->image->data.F32[0][0] = 0.5;
-    rc = pmNonLinearityLookup(myReadout, in, out);
-    if (rc == NULL) {
-        printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL pmReadout\n");
-        testStatus = false;
-    }
-    for (i=0;i<NUM_ROWS;i++) {
-        for (j=0;j<NUM_COLS;j++) {
-            psF32 expect = (float) (2 * (i + j));
-            if(i==0 && j==0) {
-                expect = 1.0;
-            }
-            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;
-            }
-        }
-    }
-
-    psFree(myReadout);
-    psFree(in);
-    psFree(inOne);
-    psFree(inSmall);
-    psFree(inBig);
-    psFree(out);
-    psFree(outOne);
-    psFree(outSmall);
-    psFree(outBig);
+
+    psFree(myReadout);
 
     printFooter(stdout, "pmNonLinear", "Testing bad input parameter conditions.", true);
