Index: /trunk/psModules/src/pmNonLinear.c
===================================================================
--- /trunk/psModules/src/pmNonLinear.c	(revision 2927)
+++ /trunk/psModules/src/pmNonLinear.c	(revision 2928)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-05 23:43:58 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-07 20:00:34 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,7 +41,7 @@
     psS32 j;
 
-    for (i=0;i<(inputReadout->image)->numRows;i++) {
-        for (j=0;j<(inputReadout->image)->numCols;j++) {
-            (inputReadout->image)->data.F32[i][j] = psPolynomial1DEval(input1DPoly, (inputReadout->image)->data.F32[i][j]);
+    for (i=0;i<inputReadout->image->numRows;i++) {
+        for (j=0;j<inputReadout->image->numCols;j++) {
+            inputReadout->image->data.F32[i][j] = psPolynomial1DEval(input1DPoly, inputReadout->image->data.F32[i][j]);
         }
     }
@@ -65,5 +65,4 @@
     PS_IMAGE_CHECK_TYPE(inputReadout->image, PS_TYPE_F32, NULL);
     PS_PTR_CHECK_NULL(inFlux,NULL);
-    psS32 tableSize = inFlux->n;
     if (inFlux->n < 2) {
         psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): input vector less than 2 elements.  Returning inputReadout image.");
@@ -71,4 +70,5 @@
     }
     PS_PTR_CHECK_NULL(outFlux,NULL);
+    psS32 tableSize = inFlux->n;
     if (inFlux->n != outFlux->n) {
         tableSize = PS_MIN(inFlux->n, outFlux->n);
@@ -87,20 +87,19 @@
 
     x.type.type = PS_TYPE_F32;
-    for (i=0;i<(inputReadout->image)->numRows;i++) {
-        for (j=0;j<(inputReadout->image)->numCols;j++) {
-            x.data.F32 = (inputReadout->image)->data.F32[i][j];
-
+    for (i=0;i<inputReadout->image->numRows;i++) {
+        for (j=0;j<inputReadout->image->numCols;j++) {
+            x.data.F32 = inputReadout->image->data.F32[i][j];
             binNum = p_psVectorBinDisect((psVector *)inFlux, &x);
 
             if (binNum == -2) {
                 // We get here if x is below the table lookup range.
-                (inputReadout->image)->data.F32[i][j] = outFlux->data.F32[0];
+                inputReadout->image->data.F32[i][j] = outFlux->data.F32[0];
                 numPixels++;
 
             } else if (binNum == -1) {
                 // We get here if x is above the table lookup range.
-                (inputReadout->image)->data.F32[i][j] = outFlux->data.F32[tableSize-1];
+                inputReadout->image->data.F32[i][j] = outFlux->data.F32[tableSize-1];
+                numPixels++;
 
-                numPixels++;
             } else if (binNum < -2) {
                 // We get here if there was some other problem.
@@ -112,6 +111,6 @@
                 slope = (outFlux->data.F32[binNum+1] - outFlux->data.F32[binNum]) /
                         (inFlux->data.F32[binNum+1]  - inFlux->data.F32[binNum]);
-                (inputReadout->image)->data.F32[i][j] = outFlux->data.F32[binNum] +
-                                                        ((x.data.F32 - inFlux->data.F32[binNum]) * slope);
+                inputReadout->image->data.F32[i][j] = outFlux->data.F32[binNum] +
+                                                      ((x.data.F32 - inFlux->data.F32[binNum]) * slope);
             }
         }
Index: /trunk/psModules/src/pmReadoutCombine.c
===================================================================
--- /trunk/psModules/src/pmReadoutCombine.c	(revision 2927)
+++ /trunk/psModules/src/pmReadoutCombine.c	(revision 2928)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-05 23:43:58 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-07 20:00:34 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -27,5 +27,5 @@
     psS32 numBits = 0;
 
-    for (i=0;i<4 * sizeof(psStatsOptions);i++) {
+    for (i=0;i<8 * sizeof(psStatsOptions);i++) {
         if (0x0001 & tmpData) {
             numBits++;
Index: /trunk/psModules/src/pmSubtractSky.c
===================================================================
--- /trunk/psModules/src/pmSubtractSky.c	(revision 2927)
+++ /trunk/psModules/src/pmSubtractSky.c	(revision 2928)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-05 23:43:58 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-07 20:00:34 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -29,5 +29,5 @@
     psS32 numBits = 0;
 
-    for (i=0;i<4 * sizeof(psStatsOptions);i++) {
+    for (i=0;i<8 * sizeof(psStatsOptions);i++) {
         if (0x0001 & tmpData) {
             numBits++;
@@ -439,8 +439,11 @@
     psStatsOptions statOptions = 0;
 
+    //
     // Return the original input readout if the fit specs are poorly defined.
+    // No warning or error messages should be generated.
+    //
     if ((fitSpec == NULL) ||
             ((fit == PM_FIT_NONE) || (fit == PM_FIT_SPLINE))) {
-        psLogMsg(__func__, PS_LOG_WARN, "Fit specs are poorly defined.  Returning in image.\n");
+        //        psLogMsg(__func__, PS_LOG_WARN, "Fit specs are poorly defined.  Returning in image.\n");
         return(in);
     }
Index: /trunk/psModules/test/tst_pmSubtractBias.c
===================================================================
--- /trunk/psModules/test/tst_pmSubtractBias.c	(revision 2927)
+++ /trunk/psModules/test/tst_pmSubtractBias.c	(revision 2928)
@@ -13,6 +13,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-05 23:25:25 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-07 20:00:34 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -654,22 +654,24 @@
     }
 
-    printf("------------------------------------------------------------------\n");
-    printf("Calling pmSubtractBias() with NULL overscan list and PM_OVERSCAN_NONE.  Should generate warning.\n");
-    rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat,
-                        0, PM_FIT_NONE, myBias);
-
-    for (i=0;i<numRows;i++) {
-        for (j=0;j<numCols;j++) {
-            psF32 expect = ((float) (i + j)) - 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 = 1;
-            }
-
-            // Restore myReadout for next test.
-            myReadout->image->data.F32[i][j] = (float) (i + j);
-        }
-    }
+    /* XXX: This does not seem to be a requirement.
+        printf("------------------------------------------------------------------\n");
+        printf("Calling pmSubtractBias() with NULL overscan list and PM_OVERSCAN_NONE.  Should generate warning.\n");
+        rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat,
+                            0, PM_FIT_NONE, myBias);
+     
+        for (i=0;i<numRows;i++) {
+            for (j=0;j<numCols;j++) {
+                psF32 expect = ((float) (i + j)) - 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 = 1;
+                }
+     
+                // Restore myReadout for next test.
+                myReadout->image->data.F32[i][j] = (float) (i + j);
+            }
+        }
+    */
 
     printf("------------------------------------------------------------------\n");
@@ -767,5 +769,5 @@
 
     printf("------------------------------------------------------------------\n");
-    printf("Calling pmSubtractBias() undersize bias image (short rows).  Should generate Warning.\n");
+    printf("Calling pmSubtractBias() undersize bias image (short rows).  Should generate Error.\n");
     myReadout = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, NULL,
                                0, PM_FIT_NONE, myBiasShortRows);
@@ -778,5 +780,5 @@
 
     printf("------------------------------------------------------------------\n");
-    printf("Calling pmSubtractBias() undersize bias image (short columns).  Should generate Warning.\n");
+    printf("Calling pmSubtractBias() undersize bias image (short columns).  Should generate Error.\n");
     myReadout = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, NULL,
                                0, PM_FIT_NONE, myBiasShortCols);
Index: /trunk/psModules/test/tst_pmSubtractSky.c
===================================================================
--- /trunk/psModules/test/tst_pmSubtractSky.c	(revision 2927)
+++ /trunk/psModules/test/tst_pmSubtractSky.c	(revision 2928)
@@ -7,6 +7,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-05 23:25:25 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-07 20:00:34 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -226,5 +226,5 @@
 
     printf("----------------------------------------------------------------\n");
-    printf("Calling pmSubtractSky() with NULL fitSpec.  Should return image, no TEST ERROR, no WARNING.\n\n");
+    printf("Calling pmSubtractSky() with NULL fitSpec.  Should return image, no ERROR, no WARNING.\n\n");
     rc = pmSubtractSky(myReadout, NULL, PM_FIT_POLYNOMIAL, 1, myStats, 2.0);
     if (rc != myReadout) {
@@ -234,5 +234,5 @@
 
     printf("----------------------------------------------------------------\n");
-    printf("Calling pmSubtractSky() with PM_FIT_NONE fit.  Should return image, no TEST ERROR, no WARNING.\n\n");
+    printf("Calling pmSubtractSky() with PM_FIT_NONE fit.  Should return image, no ERROR, no WARNING.\n\n");
     rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_NONE, 1, myStats, 2.0);
     if (rc != myReadout) {
@@ -242,5 +242,5 @@
 
     printf("----------------------------------------------------------------\n");
-    printf("Calling pmSubtractSky() with PM_FIT_SPLINE fit.  Should return image, no TEST ERROR, no WARNING.\n\n");
+    printf("Calling pmSubtractSky() with PM_FIT_SPLINE fit.  Should return image, no ERROR, no WARNING.\n\n");
     rc = pmSubtractSky(myReadout, (void *) myPoly, PM_FIT_SPLINE, 1, myStats, 2.0);
     if (rc != myReadout) {
