Index: trunk/psModules/src/pmSubtractBias.c
===================================================================
--- trunk/psModules/src/pmSubtractBias.c	(revision 4997)
+++ trunk/psModules/src/pmSubtractBias.c	(revision 5102)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-12 20:38:25 $
+ *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-23 01:55:30 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -22,9 +22,38 @@
 #define PM_SUBTRACT_BIAS_SPLINE_ORDER 3
 
+// XXX: put these in psConstants.h
+void PS_POLY1D_PRINT(psPolynomial1D *poly)
+{
+    printf("-------------- PS_POLY1D_PRINT() --------------\n");
+    printf("poly->COOL_1D_n is %d\n", poly->COOL_1D_n);
+    for (psS32 i = 0 ; i < (1 + poly->COOL_1D_n) ; i++) {
+        printf("poly->coeff[%d] is %f\n", i, poly->coeff[i]);
+    }
+}
+
+void PS_PRINT_SPLINE(psSpline1D *mySpline)
+{
+    printf("-------------- PS_PRINT_SPLINE() --------------\n");
+    printf("mySpline->n is %d\n", mySpline->n);
+    for (psS32 i = 0 ; i < mySpline->n ; i++) {
+        PS_POLY1D_PRINT(mySpline->spline[i]);
+    }
+    PS_VECTOR_PRINT_F32(mySpline->knots);
+}
+
+#define PS_IMAGE_PRINT_F32_HIDEF(NAME) \
+printf("======== printing %s ========\n", #NAME); \
+for (int i = 0 ; i < (NAME)->numRows ; i++) { \
+    for (int j = 0 ; j < (NAME)->numCols ; j++) { \
+        printf("%.5f ", (NAME)->data.F32[i][j]); \
+    } \
+    printf("\n"); \
+}\
+
 /******************************************************************************
 psSubtractFrame(): this routine will take as input a readout for the input
 image and a readout for the bias image.  The bias image is subtracted in
 place from the input image.
- *****************************************************************************/
+*****************************************************************************/
 static pmReadout *SubtractFrame(pmReadout *in,
                                 const pmReadout *bias)
@@ -143,4 +172,6 @@
     return(opt);
 }
+
+
 
 /******************************************************************************
@@ -161,4 +192,5 @@
     psTrace(".psModule.pmSubtracBias.ScaleOverscanVector", 4,
             "---- ScaleOverscanVector() begin (%d -> %d) ----\n", overscanVector->n, n);
+    //    PS_VECTOR_PRINT_F32(overscanVector);
 
     if (NULL == overscanVector) {
@@ -218,4 +250,5 @@
             return(NULL);
         }
+        //        PS_PRINT_SPLINE(mySpline);
 
         // For each element of the new vector, convert the x-ordinate to that
@@ -230,4 +263,6 @@
             psFree(mySpline);
         }
+        //        PS_VECTOR_PRINT_F32(newVec);
+
 
     } else {
@@ -376,4 +411,5 @@
     tmpOverscan = (psListElem *) overscans->head;
     while (NULL != tmpOverscan) {
+        //        PS_IMAGE_PRINT_F32_HIDEF(in->image);
         myOverscanImage = (psImage *) tmpOverscan->data;
 
