Index: /trunk/psLib/src/astro/psCoord.c
===================================================================
--- /trunk/psLib/src/astro/psCoord.c	(revision 5293)
+++ /trunk/psLib/src/astro/psCoord.c	(revision 5294)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-22 02:47:16 $
+*  @version $Revision: 1.88 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-12 21:02:20 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -90,15 +90,15 @@
 
     A = transform->x->coeff[0][0];
-    if (transform->x->COOL_2D_nX >= 1) {
+    if (transform->x->nX >= 1) {
         B = transform->x->coeff[1][0];
     }
-    if (transform->x->COOL_2D_nY >= 1) {
+    if (transform->x->nY >= 1) {
         C = transform->x->coeff[0][1];
     }
     D = transform->y->coeff[0][0];
-    if (transform->y->COOL_2D_nX >= 1) {
+    if (transform->y->nX >= 1) {
         E = transform->y->coeff[1][0];
     }
-    if (transform->y->COOL_2D_nY >= 1) {
+    if (transform->y->nY >= 1) {
         F = transform->y->coeff[0][1];
     }
@@ -154,6 +154,6 @@
     PS_ASSERT_PTR_NON_NULL(transform->y, 0);
 
-    for (psS32 i=0;i<(1 + transform->x->COOL_2D_nX);i++) {
-        for (psS32 j=0;j<(1 + transform->x->COOL_2D_nY);j++) {
+    for (psS32 i=0;i<(1 + transform->x->nX);i++) {
+        for (psS32 j=0;j<(1 + transform->x->nY);j++) {
             if (transform->x->coeff[i][j] != 0.0) {
                 if (!(((i == 0) && (j == 0)) ||
@@ -166,6 +166,6 @@
     }
 
-    for (psS32 i=0;i<(1 + transform->y->COOL_2D_nX);i++) {
-        for (psS32 j=0;j<(1 + transform->y->COOL_2D_nY);j++) {
+    for (psS32 i=0;i<(1 + transform->y->nX);i++) {
+        for (psS32 j=0;j<(1 + transform->y->nY);j++) {
             if (transform->y->coeff[i][j] != 0.0) {
                 if (!(((i == 0) && (j == 0)) ||
@@ -501,15 +501,15 @@
                                        psPolynomial2D *trans2)
 {
-    //TRACE: printf("multiplyDPoly2D(%d %d: %d %d)\n", trans1->COOL_2D_nX, trans1->COOL_2D_nY, trans2->COOL_2D_nX, trans2->COOL_2D_nY);
+    //TRACE: printf("multiplyDPoly2D(%d %d: %d %d)\n", trans1->nX, trans1->nY, trans2->nX, trans2->nY);
     // XXX: OLD:  psS32 orderX = (trans1->nX + trans2->nX) - 1;
     // XXX: Verify this (the poly order change)
-    psS32 orderX = trans1->COOL_2D_nX + trans2->COOL_2D_nX + 1;
-    psS32 orderY = trans1->COOL_2D_nY + trans2->COOL_2D_nY + 1;
+    psS32 orderX = trans1->nX + trans2->nX + 1;
+    psS32 orderY = trans1->nY + trans2->nY + 1;
 
     // XXX: Verify this (the poly order change)
     psPolynomial2D *out = psPolynomial2DAlloc(orderX-1, orderY-1, PS_POLYNOMIAL_ORD);
     //TRACE: printf("Creating poly (%d, %d)\n", orderX, orderY);
-    for (psS32 i = 0 ; i < (1 + out->COOL_2D_nX); i++) {
-        for (psS32 j = 0 ; j < (1 + out->COOL_2D_nY); j++) {
+    for (psS32 i = 0 ; i < (1 + out->nX); i++) {
+        for (psS32 j = 0 ; j < (1 + out->nY); j++) {
             out->coeff[i][j] = 0.0;
             out->mask[i][j] = 0;
@@ -517,9 +517,9 @@
     }
 
-    for (psS32 t1x = 0 ; t1x < (1 + trans1->COOL_2D_nX) ; t1x++) {
-        for (psS32 t1y = 0 ; t1y < (1 + trans1->COOL_2D_nY) ; t1y++) {
+    for (psS32 t1x = 0 ; t1x < (1 + trans1->nX) ; t1x++) {
+        for (psS32 t1y = 0 ; t1y < (1 + trans1->nY) ; t1y++) {
             if (0.0 != trans1->coeff[t1x][t1y]) {
-                for (psS32 t2x = 0 ; t2x < (1 + trans2->COOL_2D_nX) ; t2x++) {
-                    for (psS32 t2y = 0 ; t2y < (1 + trans2->COOL_2D_nY) ; t2y++) {
+                for (psS32 t2x = 0 ; t2x < (1 + trans2->nX) ; t2x++) {
+                    for (psS32 t2y = 0 ; t2y < (1 + trans2->nY) ; t2y++) {
                         /* Possible debug-only macro which checks these coords?
                         if ((t1x+t2x) >= orderX)
@@ -552,5 +552,5 @@
     PS_ASSERT_PTR_NON_NULL(trans1, NULL);
     PS_ASSERT_PTR_NON_NULL(trans2, NULL);
-    //TRACE: printf("psPlaneTransformCombine(%d, %d, %d, %d: %d, %d, %d, %d)\n", trans1->x->COOL_2D_nX, trans1->x->COOL_2D_nY, trans1->y->COOL_2D_nX, trans1->y->COOL_2D_nY, trans2->x->COOL_2D_nX, trans2->x->COOL_2D_nY, trans2->y->COOL_2D_nX, trans2->y->COOL_2D_nY);
+    //TRACE: printf("psPlaneTransformCombine(%d, %d, %d, %d: %d, %d, %d, %d)\n", trans1->x->nX, trans1->x->nY, trans1->y->nX, trans1->y->nY, trans2->x->COOL_2D_nX, trans2->x->COOL_2D_nY, trans2->y->COOL_2D_nX, trans2->y->COOL_2D_nY);
     //
     // Determine the size of the new psPlaneTransform.
@@ -558,13 +558,13 @@
     // PS_MAX(  Number of x terms in T2->x * number of x terms in T1->x,
     //          Number of y terms in T2->x * number of x terms in T1->y,
-    psS32 orderXnX = PS_MAX(((1 + trans2->x->COOL_2D_nX) * (1 + trans1->x->COOL_2D_nX)),
-                            ((1 + trans2->x->COOL_2D_nY) * (1 + trans1->y->COOL_2D_nX)));
-    psS32 orderXnY = PS_MAX(((1 + trans2->x->COOL_2D_nX) * (1 + trans1->x->COOL_2D_nY)),
-                            ((1 + trans2->x->COOL_2D_nY) * (1 + trans1->y->COOL_2D_nY)));
-
-    psS32 orderYnX = PS_MAX(((1 + trans2->y->COOL_2D_nX) * (1 + trans1->x->COOL_2D_nX)),
-                            ((1 + trans2->y->COOL_2D_nY) * (1 + trans1->y->COOL_2D_nX)));
-    psS32 orderYnY = PS_MAX(((1 + trans2->y->COOL_2D_nX) * (1 + trans1->x->COOL_2D_nY)),
-                            ((1 + trans2->y->COOL_2D_nY) * (1 + trans1->y->COOL_2D_nY)));
+    psS32 orderXnX = PS_MAX(((1 + trans2->x->nX) * (1 + trans1->x->nX)),
+                            ((1 + trans2->x->nY) * (1 + trans1->y->nX)));
+    psS32 orderXnY = PS_MAX(((1 + trans2->x->nX) * (1 + trans1->x->nY)),
+                            ((1 + trans2->x->nY) * (1 + trans1->y->nY)));
+
+    psS32 orderYnX = PS_MAX(((1 + trans2->y->nX) * (1 + trans1->x->nX)),
+                            ((1 + trans2->y->nY) * (1 + trans1->y->nX)));
+    psS32 orderYnY = PS_MAX(((1 + trans2->y->nX) * (1 + trans1->x->nY)),
+                            ((1 + trans2->y->nY) * (1 + trans1->y->nY)));
     psS32 orderX = PS_MAX(orderXnX, orderYnX);
     psS32 orderY = PS_MAX(orderXnY, orderYnY);
@@ -578,6 +578,6 @@
         myPT = psPlaneTransformAlloc(orderX, orderY);
     } else {
-        if (((1 + out->x->COOL_2D_nX) == orderX) && ((1 + out->x->COOL_2D_nY) == orderY) &&
-                ((1 + out->y->COOL_2D_nX) == orderX) && ((1 + out->y->COOL_2D_nY) == orderY)) {
+        if (((1 + out->x->nX) == orderX) && ((1 + out->x->nY) == orderY) &&
+                ((1 + out->y->nX) == orderX) && ((1 + out->y->nY) == orderY)) {
             myPT = out;
         } else {
@@ -609,6 +609,6 @@
     //
 
-    for (psS32 t2x = 0 ; t2x < (1 + trans2->x->COOL_2D_nX) ; t2x++) {
-        for (psS32 t2y = 0 ; t2y < (1 + trans2->x->COOL_2D_nX) ; t2y++) {
+    for (psS32 t2x = 0 ; t2x < (1 + trans2->x->nX) ; t2x++) {
+        for (psS32 t2y = 0 ; t2y < (1 + trans2->x->nX) ; t2y++) {
             // XXX: Verify this (poly order/nterm change)
             psPolynomial2D *currPoly = psPolynomial2DAlloc(1-1, 1-1, PS_POLYNOMIAL_ORD);
@@ -634,6 +634,6 @@
 
                 // Set the appropriate coeffs in myPT->x
-                for (psS32 i = 0 ; i < (1 + currPoly->COOL_2D_nX) ; i++) {
-                    for (psS32 j = 0 ; j < (1 + currPoly->COOL_2D_nY) ; j++) {
+                for (psS32 i = 0 ; i < (1 + currPoly->nX) ; i++) {
+                    for (psS32 j = 0 ; j < (1 + currPoly->nY) ; j++) {
                         myPT->x->coeff[i][j]+= currPoly->coeff[i][j] * trans2->x->coeff[t2x][t2y];
                     }
@@ -645,6 +645,6 @@
 
 
-    for (psS32 t2x = 0 ; t2x < (1 + trans2->y->COOL_2D_nX) ; t2x++) {
-        for (psS32 t2y = 0 ; t2y < (1 + trans2->y->COOL_2D_nY) ; t2y++) {
+    for (psS32 t2x = 0 ; t2x < (1 + trans2->y->nX) ; t2x++) {
+        for (psS32 t2y = 0 ; t2y < (1 + trans2->y->nY) ; t2y++) {
             // XXX: Verify this (poly order/nterm change)
             psPolynomial2D *currPoly = psPolynomial2DAlloc(1-1, 1-1, PS_POLYNOMIAL_ORD);
@@ -670,6 +670,6 @@
 
                 // Set the appropriate coeffs in myPT->x
-                for (psS32 i = 0 ; i < (1 + currPoly->COOL_2D_nX) ; i++) {
-                    for (psS32 j = 0 ; j < (1 + currPoly->COOL_2D_nY) ; j++) {
+                for (psS32 i = 0 ; i < (1 + currPoly->nX) ; i++) {
+                    for (psS32 j = 0 ; j < (1 + currPoly->nY) ; j++) {
                         myPT->y->coeff[i][j]+= currPoly->coeff[i][j] * trans2->y->coeff[t2x][t2y];
                     }
@@ -702,7 +702,7 @@
 
     psS32 numCoords = PS_MIN(source->n, dest->n);
-    psS32 order = PS_MAX(trans->x->COOL_2D_nX, trans->x->COOL_2D_nY);
-    order = PS_MAX(order, trans->y->COOL_2D_nX);
-    order = PS_MAX(order, trans->y->COOL_2D_nY);
+    psS32 order = PS_MAX(trans->x->nX, trans->x->nY);
+    order = PS_MAX(order, trans->y->nX);
+    order = PS_MAX(order, trans->y->nY);
     // XXX: Verify, or recode, after the poly norder/nterm change.
     order++;
@@ -822,11 +822,11 @@
 
     // Ensure that the input transformation is symmetrical.
-    if ((in->x->COOL_2D_nX != in->x->COOL_2D_nY) ||
-            (in->y->COOL_2D_nX != in->y->COOL_2D_nY) ||
-            (in->x->COOL_2D_nX != in->y->COOL_2D_nX)) {
+    if ((in->x->nX != in->x->nY) ||
+            (in->y->nX != in->y->nY) ||
+            (in->x->nX != in->y->nX)) {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Input transformation must have same nX==nY.");
     }
     // XXX: recode or verify after poly changes
-    psS32 order = 1 + in->x->COOL_2D_nX;
+    psS32 order = 1 + in->x->nX;
 
     psPlaneTransform *myPT = NULL;
@@ -842,6 +842,6 @@
     } else {
         // XXX: recode or verify after poly changes
-        if (((1 + out->x->COOL_2D_nX) == order) && ((1 + out->x->COOL_2D_nY) == order) &&
-                ((1 + out->y->COOL_2D_nX) == order) && ((1 + out->y->COOL_2D_nX) == order)) {
+        if (((1 + out->x->nX) == order) && ((1 + out->x->nY) == order) &&
+                ((1 + out->y->nX) == order) && ((1 + out->y->nX) == order)) {
             myPT = out;
         } else {
@@ -854,11 +854,11 @@
     // Copy the input transform to myPT.
     //
-    for (psS32 i = 0 ; i < (1 + in->x->COOL_2D_nX) ; i++) {
-        for (psS32 j = 0 ; j < (1 + in->x->COOL_2D_nY) ; j++) {
+    for (psS32 i = 0 ; i < (1 + in->x->nX) ; i++) {
+        for (psS32 j = 0 ; j < (1 + in->x->nY) ; j++) {
             myPT->x->coeff[i][j] = in->x->coeff[i][j];
         }
     }
-    for (psS32 i = 0 ; i < (1 + in->y->COOL_2D_nX) ; i++) {
-        for (psS32 j = 0 ; j < (1 + in->y->COOL_2D_nY) ; j++) {
+    for (psS32 i = 0 ; i < (1 + in->y->nX) ; i++) {
+        for (psS32 j = 0 ; j < (1 + in->y->nY) ; j++) {
             myPT->y->coeff[i][j] = in->y->coeff[i][j];
         }
@@ -940,7 +940,7 @@
 
     // This loop starts at loop_x=1 since the derivative of the loop_x=0 terms are all 0.0
-    for (psS32 loop_x = 1; loop_x < (1 + xPoly->COOL_2D_nX); loop_x++) {
+    for (psS32 loop_x = 1; loop_x < (1 + xPoly->nX); loop_x++) {
         ySum = 1.0;
-        for (psS32 loop_y = 0; loop_y < (1 + xPoly->COOL_2D_nY); loop_y++) {
+        for (psS32 loop_y = 0; loop_y < (1 + xPoly->nY); loop_y++) {
             //
             // For each iteration of the loop, we multiple the (x, y) coefficient
@@ -960,7 +960,7 @@
 
     // This loop starts at loop_y=1 since the derivative of the loop_y=0 terms are all 0.0
-    for (psS32 loop_x = 0; loop_x < (1 + yPoly->COOL_2D_nX); loop_x++) {
+    for (psS32 loop_x = 0; loop_x < (1 + yPoly->nX); loop_x++) {
         ySum = 1.0;
-        for (psS32 loop_y = 1; loop_y < (1 + yPoly->COOL_2D_nY); loop_y++) {
+        for (psS32 loop_y = 1; loop_y < (1 + yPoly->nY); loop_y++) {
             //
             // For each iteration of the loop, we multiple the (x, y) coefficient
Index: /trunk/psLib/src/imageops/psImageStats.c
===================================================================
--- /trunk/psLib/src/imageops/psImageStats.c	(revision 5293)
+++ /trunk/psLib/src/imageops/psImageStats.c	(revision 5294)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.82 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-30 23:09:13 $
+ *  @version $Revision: 1.83 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-12 21:02:20 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -233,8 +233,8 @@
     chebPolys[1]->coeff[1] = 1;
     for (i = 2; i < maxChebyPoly; i++) {
-        for (j = 0; j < (1 + chebPolys[i - 1]->COOL_1D_n); j++) {
+        for (j = 0; j < (1 + chebPolys[i - 1]->nX); j++) {
             chebPolys[i]->coeff[j + 1] = 2 * chebPolys[i - 1]->coeff[j];
         }
-        for (j = 0; j < (1 + chebPolys[i - 2]->COOL_1D_n); j++) {
+        for (j = 0; j < (1 + chebPolys[i - 2]->nX); j++) {
             chebPolys[i]->coeff[j] -= chebPolys[i - 2]->coeff[j];
         }
@@ -291,7 +291,7 @@
     // 29 in the ADD: sums[k][l] = SUM {
     // image(x,y) * Tk(x) * Tl(y) }
-    sums = (double **)psAlloc((1 + coeffs->COOL_2D_nX) * sizeof(double *));
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
-        sums[i] = (double *)psAlloc((1 + coeffs->COOL_2D_nY) * sizeof(double));
+    sums = (double **)psAlloc((1 + coeffs->nX) * sizeof(double *));
+    for (i = 0; i < (1 + coeffs->nX); i++) {
+        sums[i] = (double *)psAlloc((1 + coeffs->nY) * sizeof(double));
     }
     // We scale the pixel positions to values
@@ -303,13 +303,13 @@
     // are needed, then create them.
     // XXX: recorde or verify the poly order/nterm change
-    maxChebyPoly = coeffs->COOL_2D_nX;
-    if (coeffs->COOL_2D_nY > coeffs->COOL_2D_nX) {
-        maxChebyPoly = coeffs->COOL_2D_nY;
+    maxChebyPoly = coeffs->nX;
+    if (coeffs->nY > coeffs->nX) {
+        maxChebyPoly = coeffs->nY;
     }
     chebPolys = p_psCreateChebyshevPolys(maxChebyPoly + 1);
 
     // Compute the sums[][] data structure.
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
-        for (j = 0; j < (1 + coeffs->COOL_2D_nY); j++) {
+    for (i = 0; i < (1 + coeffs->nX); i++) {
+        for (j = 0; j < (1 + coeffs->nY); j++) {
             sums[i][j] = 0.0;
             for (x = 0; x < input->numRows; x++) {
@@ -332,6 +332,6 @@
     }
 
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
-        for (j = 0; j < (1 + coeffs->COOL_2D_nY); j++) {
+    for (i = 0; i < (1 + coeffs->nX); i++) {
+        for (j = 0; j < (1 + coeffs->nY); j++) {
             coeffs->coeff[i][j] = sums[i][j];
             coeffs->coeff[i][j] /= (double)(input->numRows * input->numCols);
@@ -355,5 +355,5 @@
 
     // Free some data
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
+    for (i = 0; i < (1 + coeffs->nX); i++) {
         psFree(sums[i]);
     }
@@ -438,7 +438,7 @@
     // 29 in the ADD: sums[k][l] = SUM {
     // image(x,y) * Tk(x) * Tl(y) }
-    sums = (double **)psAlloc((1 + coeffs->COOL_2D_nX) * sizeof(double *));
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
-        sums[i] = (double *)psAlloc((1 + coeffs->COOL_2D_nY) * sizeof(double));
+    sums = (double **)psAlloc((1 + coeffs->nX) * sizeof(double *));
+    for (i = 0; i < (1 + coeffs->nX); i++) {
+        sums[i] = (double *)psAlloc((1 + coeffs->nY) * sizeof(double));
     }
     // We scale the pixel positions to values
@@ -449,13 +449,13 @@
     // Determine how many Chebyshev polynomials
     // are needed, then create them.
-    maxChebyPoly = coeffs->COOL_2D_nX;
-    if (coeffs->COOL_2D_nY > coeffs->COOL_2D_nX) {
-        maxChebyPoly = coeffs->COOL_2D_nY;
+    maxChebyPoly = coeffs->nX;
+    if (coeffs->nY > coeffs->nX) {
+        maxChebyPoly = coeffs->nY;
     }
     chebPolys = p_psCreateChebyshevPolys(maxChebyPoly + 1);
 
     // Compute the sums[][] data structure.
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
-        for (j = 0; j < (1 + coeffs->COOL_2D_nY); j++) {
+    for (i = 0; i < (1 + coeffs->nX); i++) {
+        for (j = 0; j < (1 + coeffs->nY); j++) {
             sums[i][j] = 0.0;
             for (x = 0; x < input->numRows; x++) {
@@ -481,6 +481,6 @@
     }
 
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
-        for (j = 0; j < (1 + coeffs->COOL_2D_nY); j++) {
+    for (i = 0; i < (1 + coeffs->nX); i++) {
+        for (j = 0; j < (1 + coeffs->nY); j++) {
             coeffs->coeff[i][j] = sums[i][j];
             coeffs->coeff[i][j] /= (double)(input->numRows * input->numCols);
@@ -504,5 +504,5 @@
 
     // Free some data
-    for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
+    for (i = 0; i < (1 + coeffs->nX); i++) {
         psFree(sums[i]);
     }
@@ -540,7 +540,7 @@
     // Determine how many Chebyshev polynomials
     // are needed, then create them.
-    maxChebyPoly = coeffs->COOL_2D_nX;
-    if (coeffs->COOL_2D_nY > coeffs->COOL_2D_nX) {
-        maxChebyPoly = coeffs->COOL_2D_nY;
+    maxChebyPoly = coeffs->nX;
+    if (coeffs->nY > coeffs->nX) {
+        maxChebyPoly = coeffs->nY;
     }
 
@@ -550,6 +550,6 @@
         for (y = 0; y < input->numCols; y++) {
             polySum = 0.0;
-            for (i = 0; i < (1 + coeffs->COOL_2D_nX); i++) {
-                for (j = 0; j < (1 + coeffs->COOL_2D_nY); j++) {
+            for (i = 0; i < (1 + coeffs->nX); i++) {
+                for (j = 0; j < (1 + coeffs->nY); j++) {
                     polySum +=
                         psPolynomial1DEval(chebPolys[i], rScalingFactors[x]) *
Index: /trunk/psLib/src/math/psConstants.h
===================================================================
--- /trunk/psLib/src/math/psConstants.h	(revision 5293)
+++ /trunk/psLib/src/math/psConstants.h	(revision 5294)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.77 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-27 23:16:59 $
+ *  @version $Revision: 1.78 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-12 21:02:20 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -579,5 +579,5 @@
 
 #define PS_POLY_PRINT_1D(NAME) \
-for (psS32 i = 0 ; i < NAME->COOL_1D_n ; i++) {\
+for (psS32 i = 0 ; i < NAME->nX ; i++) {\
     printf("%s->coeff[%d] is %f\n", #NAME, i, NAME->coeff[i]); \
 }\
Index: /trunk/psLib/src/math/psMinimize.c
===================================================================
--- /trunk/psLib/src/math/psMinimize.c	(revision 5293)
+++ /trunk/psLib/src/math/psMinimize.c	(revision 5294)
@@ -10,6 +10,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.141 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-29 02:13:54 $
+ *  @version $Revision: 1.142 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-12 21:02:20 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1507,5 +1507,5 @@
     // XXX: these ASSERTS are redundant.
     PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_1D_n, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
     PS_ASSERT_VECTOR_NON_NULL(y, NULL);
     PS_ASSERT_VECTOR_TYPE(y, PS_TYPE_F64, NULL);
@@ -1571,5 +1571,5 @@
     fac = 2.0/((psF32) n);
     // XXX: is this loop bound correct?
-    for (j=0;j<myPoly->COOL_1D_n+1;j++) {
+    for (j=0;j<myPoly->nX+1;j++) {
         sum = 0.0;
         for (k=0;k<n;k++) {
@@ -1600,5 +1600,5 @@
     // XXX: these ASSERTS are redundant.
     PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_1D_n, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
     PS_ASSERT_VECTOR_NON_NULL(f, NULL);
     PS_ASSERT_VECTOR_TYPE(f, PS_TYPE_F64, NULL);
@@ -1643,5 +1643,5 @@
     }
 
-    nTerm = 1 + myPoly->COOL_1D_n;
+    nTerm = 1 + myPoly->nX;
     nOrder = nTerm - 1;
 
@@ -1743,5 +1743,5 @@
 
     PS_ASSERT_POLY_NON_NULL(poly, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(poly->COOL_1D_n, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(poly->nX, NULL);
     PS_ASSERT_VECTOR_NON_NULL(f, NULL);
     PS_ASSERT_VECTOR_NON_EMPTY(f, NULL);
@@ -1883,6 +1883,6 @@
     // These ASSERTS are redundant.
     PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_2D_nX, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_2D_nY, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nY, NULL);
 
     PS_ASSERT_VECTOR_NON_NULL(f, NULL);
@@ -1911,6 +1911,6 @@
 
     // XXX:Watch for changes to the psPolys: nTerm != nOrder.
-    psS32 nXterm = 1 + myPoly->COOL_2D_nX;
-    psS32 nYterm = 1 + myPoly->COOL_2D_nY;
+    psS32 nXterm = 1 + myPoly->nX;
+    psS32 nYterm = 1 + myPoly->nY;
     nTerm = nXterm * nYterm;
 
@@ -2310,7 +2310,7 @@
     // These ASSERTS are redundant.
     PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_3D_nX, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_3D_nY, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_3D_nZ, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nY, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nZ, NULL);
 
     PS_ASSERT_VECTOR_NON_NULL(f, NULL);
@@ -2573,8 +2573,8 @@
     // These ASSERTS are redundant.
     PS_ASSERT_POLY_NON_NULL(myPoly, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_4D_nX, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_4D_nY, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_4D_nZ, NULL);
-    PS_ASSERT_INT_NONNEGATIVE(myPoly->COOL_4D_nT, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nX, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nY, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nZ, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(myPoly->nT, NULL);
     PS_ASSERT_VECTOR_NON_NULL(f, NULL);
     PS_ASSERT_VECTOR_TYPE(f, PS_TYPE_F64, NULL);
Index: /trunk/psLib/src/math/psPolynomial.c
===================================================================
--- /trunk/psLib/src/math/psPolynomial.c	(revision 5293)
+++ /trunk/psLib/src/math/psPolynomial.c	(revision 5294)
@@ -7,6 +7,6 @@
 *  polynomials.  It also contains a Gaussian functions.
 *
-*  @version $Revision: 1.129 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-29 20:06:58 $
+*  @version $Revision: 1.130 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-12 21:02:20 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -95,5 +95,5 @@
     unsigned int x = 0;
 
-    for (x = 0; x < (1 + poly->COOL_2D_nX); x++) {
+    for (x = 0; x < (1 + poly->nX); x++) {
         psFree(poly->coeff[x]);
         psFree(poly->coeffErr[x]);
@@ -110,6 +110,6 @@
     unsigned int y = 0;
 
-    for (x = 0; x < (1 + poly->COOL_3D_nX); x++) {
-        for (y = 0; y < (1 + poly->COOL_3D_nY); y++) {
+    for (x = 0; x < (1 + poly->nX); x++) {
+        for (y = 0; y < (1 + poly->nY); y++) {
             psFree(poly->coeff[x][y]);
             psFree(poly->coeffErr[x][y]);
@@ -132,7 +132,7 @@
     unsigned int z = 0;
 
-    for (x = 0; x < (1 + poly->COOL_4D_nX); x++) {
-        for (y = 0; y < (1 + poly->COOL_4D_nY); y++) {
-            for (z = 0; z < (1 + poly->COOL_4D_nZ); z++) {
+    for (x = 0; x < (1 + poly->nX); x++) {
+        for (y = 0; y < (1 + poly->nY); y++) {
+            for (z = 0; z < (1 + poly->nZ); z++) {
                 psFree(poly->coeff[x][y][z]);
                 psFree(poly->coeffErr[x][y][z]);
@@ -185,8 +185,8 @@
 
         for (psS32 i = 2; i < maxChebyPoly; i++) {
-            for (psS32 j = 0; j < chebPolys[i - 1]->COOL_1D_n; j++) {
+            for (psS32 j = 0; j < chebPolys[i - 1]->nX; j++) {
                 chebPolys[i]->coeff[j + 1] = 2 * chebPolys[i - 1]->coeff[j];
             }
-            for (psS32 j = 0; j < chebPolys[i - 2]->COOL_1D_n; j++) {
+            for (psS32 j = 0; j < chebPolys[i - 2]->nX; j++) {
                 chebPolys[i]->coeff[j] -= chebPolys[i - 2]->coeff[j];
             }
@@ -213,11 +213,11 @@
             "---- Calling ordPolynomial1DEval(%lf)\n", x);
     psTrace(".psLib.dataManip.psPolynomial.ordPolynomial1DEval", 4,
-            "Polynomial order is %u\n", poly->COOL_1D_n);
-    for (loop_x = 0; loop_x < poly->COOL_1D_n+1; loop_x++) {
+            "Polynomial order is %u\n", poly->nX);
+    for (loop_x = 0; loop_x < poly->nX+1; loop_x++) {
         psTrace(".psLib.dataManip.psPolynomial.ordPolynomial1DEval", 4,
                 "Polynomial coeff[%u] is %lf\n", loop_x, poly->coeff[loop_x]);
     }
 
-    for (loop_x = 0; loop_x < poly->COOL_1D_n+1; loop_x++) {
+    for (loop_x = 0; loop_x < poly->nX+1; loop_x++) {
         if (poly->mask[loop_x] == 0) {
             // XXX: If you set the tracelevel to 10 here, and later set the tracelevel to
@@ -241,11 +241,11 @@
     PS_ASSERT_DOUBLE_WITHIN_RANGE(x, -1.0, 1.0, 0.0);
     // XXX: Create a macro for this in psConstants.h
-    if (poly->COOL_1D_n < 1) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error: Chebyshev polynomial is order %u.", poly->COOL_1D_n);
+    if (poly->nX < 1) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Error: Chebyshev polynomial is order %u.", poly->nX);
         return(NAN);
     }
     psVector *d;
     // XXX: n should be nTerms here (for clarity).  Or get rid of the variable.
-    unsigned int n = 1 + poly->COOL_1D_n;
+    unsigned int n = 1 + poly->nX;
     unsigned int i;
     psF64 tmp = 0.0;
@@ -305,8 +305,8 @@
     psPolynomial1D **chebPolys = NULL;
 
-    chebPolys = createChebyshevPolys(1 + poly->COOL_1D_n);
+    chebPolys = createChebyshevPolys(1 + poly->nX);
 
     tmp = 0.0;
-    for (i=0;i<(1 + poly->COOL_1D_n);i++) {
+    for (i=0;i<(1 + poly->nX);i++) {
         tmp+= (poly->coeff[i] * psPolynomial1DEval(x, chebPolys[i]));
     }
@@ -330,7 +330,7 @@
     psF64 ySum = 1.0;
 
-    for (loop_x = 0; loop_x < (1 + poly->COOL_2D_nX); loop_x++) {
+    for (loop_x = 0; loop_x < (1 + poly->nX); loop_x++) {
         ySum = xSum;
-        for (loop_y = 0; loop_y < (1 + poly->COOL_2D_nY); loop_y++) {
+        for (loop_y = 0; loop_y < (1 + poly->nY); loop_y++) {
             if (poly->mask[loop_x][loop_y] == 0) {
                 polySum += ySum * poly->coeff[loop_x][loop_y];
@@ -361,12 +361,12 @@
     // Determine how many Chebyshev polynomials
     // are needed, then create them.
-    maxChebyPoly = poly->COOL_2D_nX;
-    if (poly->COOL_2D_nY > maxChebyPoly) {
-        maxChebyPoly = poly->COOL_2D_nY;
+    maxChebyPoly = poly->nX;
+    if (poly->nY > maxChebyPoly) {
+        maxChebyPoly = poly->nY;
     }
     chebPolys = createChebyshevPolys(maxChebyPoly + 1);
 
-    for (loop_x = 0; loop_x < (1 + poly->COOL_2D_nX); loop_x++) {
-        for (loop_y = 0; loop_y < (1 + poly->COOL_2D_nY); loop_y++) {
+    for (loop_x = 0; loop_x < (1 + poly->nX); loop_x++) {
+        for (loop_y = 0; loop_y < (1 + poly->nY); loop_y++) {
             if (poly->mask[loop_x][loop_y] == 0) {
                 polySum += poly->coeff[loop_x][loop_y] *
@@ -396,9 +396,9 @@
     psF64 zSum = 1.0;
 
-    for (loop_x = 0; loop_x < (1 + poly->COOL_3D_nX); loop_x++) {
+    for (loop_x = 0; loop_x < (1 + poly->nX); loop_x++) {
         ySum = xSum;
-        for (loop_y = 0; loop_y < (1 + poly->COOL_3D_nY); loop_y++) {
+        for (loop_y = 0; loop_y < (1 + poly->nY); loop_y++) {
             zSum = ySum;
-            for (loop_z = 0; loop_z < (1 + poly->COOL_3D_nZ); loop_z++) {
+            for (loop_z = 0; loop_z < (1 + poly->nZ); loop_z++) {
                 if (poly->mask[loop_x][loop_y][loop_z] == 0) {
                     polySum += zSum * poly->coeff[loop_x][loop_y][loop_z];
@@ -432,16 +432,16 @@
     // Determine how many Chebyshev polynomials
     // are needed, then create them.
-    maxChebyPoly = poly->COOL_3D_nX;
-    if (poly->COOL_3D_nY > maxChebyPoly) {
-        maxChebyPoly = poly->COOL_3D_nY;
-    }
-    if (poly->COOL_3D_nZ > maxChebyPoly) {
-        maxChebyPoly = poly->COOL_3D_nZ;
+    maxChebyPoly = poly->nX;
+    if (poly->nY > maxChebyPoly) {
+        maxChebyPoly = poly->nY;
+    }
+    if (poly->nZ > maxChebyPoly) {
+        maxChebyPoly = poly->nZ;
     }
     chebPolys = createChebyshevPolys(maxChebyPoly + 1);
 
-    for (loop_x = 0; loop_x < (1 + poly->COOL_3D_nX); loop_x++) {
-        for (loop_y = 0; loop_y < (1 + poly->COOL_3D_nY); loop_y++) {
-            for (loop_z = 0; loop_z < (1 + poly->COOL_3D_nZ); loop_z++) {
+    for (loop_x = 0; loop_x < (1 + poly->nX); loop_x++) {
+        for (loop_y = 0; loop_y < (1 + poly->nY); loop_y++) {
+            for (loop_z = 0; loop_z < (1 + poly->nZ); loop_z++) {
                 if (poly->mask[loop_x][loop_y][loop_z] == 0) {
                     polySum += poly->coeff[loop_x][loop_y][loop_z] *
@@ -477,11 +477,11 @@
     psF64 tSum = 1.0;
 
-    for (loop_x = 0; loop_x < (1 + poly->COOL_4D_nX); loop_x++) {
+    for (loop_x = 0; loop_x < (1 + poly->nX); loop_x++) {
         ySum = xSum;
-        for (loop_y = 0; loop_y < (1 + poly->COOL_4D_nY); loop_y++) {
+        for (loop_y = 0; loop_y < (1 + poly->nY); loop_y++) {
             zSum = ySum;
-            for (loop_z = 0; loop_z < (1 + poly->COOL_4D_nZ); loop_z++) {
+            for (loop_z = 0; loop_z < (1 + poly->nZ); loop_z++) {
                 tSum = zSum;
-                for (loop_t = 0; loop_t < (1 + poly->COOL_4D_nT); loop_t++) {
+                for (loop_t = 0; loop_t < (1 + poly->nT); loop_t++) {
                     if (poly->mask[loop_x][loop_y][loop_z][loop_t] == 0) {
                         polySum += tSum * poly->coeff[loop_x][loop_y][loop_z][loop_t];
@@ -520,21 +520,21 @@
     // Determine how many Chebyshev polynomials
     // are needed, then create them.
-    maxChebyPoly = poly->COOL_4D_nX;
-    if (poly->COOL_4D_nY > maxChebyPoly) {
-        maxChebyPoly = poly->COOL_4D_nY;
-    }
-    if (poly->COOL_4D_nZ > maxChebyPoly) {
-        maxChebyPoly = poly->COOL_4D_nZ;
-    }
-    if (poly->COOL_4D_nT > maxChebyPoly) {
-        maxChebyPoly = poly->COOL_4D_nT;
+    maxChebyPoly = poly->nX;
+    if (poly->nY > maxChebyPoly) {
+        maxChebyPoly = poly->nY;
+    }
+    if (poly->nZ > maxChebyPoly) {
+        maxChebyPoly = poly->nZ;
+    }
+    if (poly->nT > maxChebyPoly) {
+        maxChebyPoly = poly->nT;
     }
     // XXX: Add 1 since createChebyshevPolys() takes nTerms, not nOrder.
     chebPolys = createChebyshevPolys(maxChebyPoly + 1);
 
-    for (loop_x = 0; loop_x < (1 + poly->COOL_4D_nX); loop_x++) {
-        for (loop_y = 0; loop_y < (1 + poly->COOL_4D_nY); loop_y++) {
-            for (loop_z = 0; loop_z < (1 + poly->COOL_4D_nZ); loop_z++) {
-                for (loop_t = 0; loop_t < (1 + poly->COOL_4D_nT); loop_t++) {
+    for (loop_x = 0; loop_x < (1 + poly->nX); loop_x++) {
+        for (loop_y = 0; loop_y < (1 + poly->nY); loop_y++) {
+            for (loop_z = 0; loop_z < (1 + poly->nZ); loop_z++) {
+                for (loop_t = 0; loop_t < (1 + poly->nT); loop_t++) {
                     if (poly->mask[loop_x][loop_y][loop_z][loop_t] == 0) {
                         polySum += poly->coeff[loop_x][loop_y][loop_z][loop_t] *
@@ -627,5 +627,5 @@
 
     newPoly->type = type;
-    newPoly->COOL_1D_n = n;
+    newPoly->nX = n;
     newPoly->coeff = psAlloc((n + 1) * sizeof(psF64));
     newPoly->coeffErr = psAlloc((n + 1) * sizeof(psF64));
@@ -655,6 +655,6 @@
 
     newPoly->type = type;
-    newPoly->COOL_2D_nX = nX;
-    newPoly->COOL_2D_nY = nY;
+    newPoly->nX = nX;
+    newPoly->nY = nY;
 
     newPoly->coeff = psAlloc((1 + nX) * sizeof(psF64 *));
@@ -695,7 +695,7 @@
 
     newPoly->type = type;
-    newPoly->COOL_3D_nX = nX;
-    newPoly->COOL_3D_nY = nY;
-    newPoly->COOL_3D_nZ = nZ;
+    newPoly->nX = nX;
+    newPoly->nY = nY;
+    newPoly->nZ = nZ;
 
     newPoly->coeff = psAlloc((nX + 1) * sizeof(psF64 **));
@@ -746,8 +746,8 @@
 
     newPoly->type = type;
-    newPoly->COOL_4D_nX = nX;
-    newPoly->COOL_4D_nY = nY;
-    newPoly->COOL_4D_nZ = nZ;
-    newPoly->COOL_4D_nT = nT;
+    newPoly->nX = nX;
+    newPoly->nY = nY;
+    newPoly->nZ = nZ;
+    newPoly->nT = nT;
 
     newPoly->coeff = psAlloc((nX + 1) * sizeof(psF64 ***));
Index: /trunk/psLib/src/math/psPolynomial.h
===================================================================
--- /trunk/psLib/src/math/psPolynomial.h	(revision 5293)
+++ /trunk/psLib/src/math/psPolynomial.h	(revision 5294)
@@ -11,6 +11,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-22 02:47:16 $
+ *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-12 21:02:20 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -76,5 +76,5 @@
 {
     psPolynomialType type;              ///< Polynomial type
-    unsigned int COOL_1D_n;             ///< Polynomial order
+    unsigned int nX;             ///< Polynomial order
     psF64 *coeff;                       ///< Coefficients
     psF64 *coeffErr;                    ///< Error in coefficients
@@ -90,6 +90,6 @@
 {
     psPolynomialType type;              ///< Polynomial type
-    unsigned int COOL_2D_nX;            ///< Polynomial order in x
-    unsigned int COOL_2D_nY;            ///< Polynomial order in y
+    unsigned int nX;            ///< Polynomial order in x
+    unsigned int nY;            ///< Polynomial order in y
     psF64 **coeff;                      ///< Coefficients
     psF64 **coeffErr;                   ///< Error in coefficients
@@ -105,7 +105,7 @@
 {
     psPolynomialType type;              ///< Polynomial type
-    unsigned int COOL_3D_nX;            ///< Polynomial order in x
-    unsigned int COOL_3D_nY;            ///< Polynomial order in y
-    unsigned int COOL_3D_nZ;            ///< Polynomial order in z
+    unsigned int nX;            ///< Polynomial order in x
+    unsigned int nY;            ///< Polynomial order in y
+    unsigned int nZ;            ///< Polynomial order in z
     psF64 ***coeff;                     ///< Coefficients
     psF64 ***coeffErr;                  ///< Error in coefficients
@@ -121,8 +121,8 @@
 {
     psPolynomialType type;              ///< Polynomial type
-    unsigned int COOL_4D_nX;            ///< Polynomial order in x
-    unsigned int COOL_4D_nY;            ///< Polynomial order in y
-    unsigned int COOL_4D_nZ;            ///< Polynomial order in z
-    unsigned int COOL_4D_nT;            ///< Polynomial order in t
+    unsigned int nX;            ///< Polynomial order in x
+    unsigned int nY;            ///< Polynomial order in y
+    unsigned int nZ;            ///< Polynomial order in z
+    unsigned int nT;            ///< Polynomial order in t
     psF64 ****coeff;                    ///< Coefficients
     psF64 ****coeffErr;                 ///< Error in coefficients
Index: /trunk/psLib/test/astro/tst_psCoord.c
===================================================================
--- /trunk/psLib/test/astro/tst_psCoord.c	(revision 5293)
+++ /trunk/psLib/test/astro/tst_psCoord.c	(revision 5294)
@@ -6,6 +6,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-22 22:24:58 $
+*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-12 21:02:20 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -52,22 +52,22 @@
 
     // Verify returned transform has members set properly
-    if ((1 + myPT->x->COOL_2D_nX) != NX_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPT->x->COOL_2D_nX is %d, should be %d",
-                myPT->x->COOL_2D_nX, NX_TERMS-1);
+    if ((1 + myPT->x->nX) != NX_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPT->x->nX is %d, should be %d",
+                myPT->x->nX, NX_TERMS-1);
         return 2;
     }
-    if ((1 + myPT->y->COOL_2D_nX) != NX_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPT->y->COOL_2D_nX is %d, should be %d",
-                myPT->y->COOL_2D_nX, NX_TERMS-1);
+    if ((1 + myPT->y->nX) != NX_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPT->y->nX is %d, should be %d",
+                myPT->y->nX, NX_TERMS-1);
         return 3;
     }
-    if ((1 + myPT->x->COOL_2D_nY) != NY_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPT->x->COOL_2D_nY is %d, should be %d",
-                myPT->x->COOL_2D_nY, NY_TERMS-1);
+    if ((1 + myPT->x->nY) != NY_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPT->x->nY is %d, should be %d",
+                myPT->x->nY, NY_TERMS-1);
         return 4;
     }
-    if ((1 + myPT->y->COOL_2D_nY) != NY_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPT->y->COOL_2D_nY is %d, should be %d",
-                myPT->y->COOL_2D_nY, NY_TERMS-1);
+    if ((1 + myPT->y->nY) != NY_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPT->y->nY is %d, should be %d",
+                myPT->y->nY, NY_TERMS-1);
         return 5;
     }
@@ -109,42 +109,42 @@
     }
     // Verify the terms are properly set after allocation
-    if ((1 + myPD->x->COOL_4D_nX) != NX_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->x->COOL_4D_nX is %d, should be %d",
-                myPD->x->COOL_4D_nX, NX_TERMS-1);
+    if ((1 + myPD->x->nX) != NX_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->x->nX is %d, should be %d",
+                myPD->x->nX, NX_TERMS-1);
         return 2;
     }
-    if ((1 + myPD->y->COOL_4D_nX) != NX_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->y->COOL_4D_nX is %d, should be %d",
-                myPD->y->COOL_4D_nX, NX_TERMS-1);
+    if ((1 + myPD->y->nX) != NX_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->y->nX is %d, should be %d",
+                myPD->y->nX, NX_TERMS-1);
         return 3;
     }
-    if ((1 + myPD->x->COOL_4D_nY) != NY_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->x->COOL_4D_nY is %d, should be %d",
-                myPD->x->COOL_4D_nY, NY_TERMS-1);
+    if ((1 + myPD->x->nY) != NY_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->x->nY is %d, should be %d",
+                myPD->x->nY, NY_TERMS-1);
         return 4;
     }
-    if ((1 + myPD->y->COOL_4D_nY) != NY_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->y->COOL_4D_nY is %d, should be %d",
-                myPD->y->COOL_4D_nY, NY_TERMS-1);
+    if ((1 + myPD->y->nY) != NY_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->y->nY is %d, should be %d",
+                myPD->y->nY, NY_TERMS-1);
         return 5;
     }
-    if ((1 + myPD->x->COOL_4D_nZ) != NZ_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->x->COOL_4D_nZ is %d, should be %d",
-                myPD->x->COOL_4D_nX, NZ_TERMS-1);
+    if ((1 + myPD->x->nZ) != NZ_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->x->nZ is %d, should be %d",
+                myPD->x->nX, NZ_TERMS-1);
         return 6;
     }
-    if ((1 + myPD->y->COOL_4D_nZ) != NZ_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->y->COOL_4D_nZ is %d, should be %d",
-                myPD->y->COOL_4D_nZ, NZ_TERMS-1);
+    if ((1 + myPD->y->nZ) != NZ_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->y->nZ is %d, should be %d",
+                myPD->y->nZ, NZ_TERMS-1);
         return 7;
     }
-    if ((1 + myPD->x->COOL_4D_nT) != NT_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->x->COOL_4D_nT is %d, should be %d",
-                myPD->x->COOL_4D_nT, NT_TERMS-1);
+    if ((1 + myPD->x->nT) != NT_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->x->nT is %d, should be %d",
+                myPD->x->nT, NT_TERMS-1);
         return 8;
     }
-    if ((1 + myPD->y->COOL_4D_nT) != NT_TERMS) {
-        psError(PS_ERR_UNKNOWN,true,"myPD->y->COOL_4D_nT is %d, should be %d",
-                myPD->y->COOL_4D_nT, NT_TERMS-1);
+    if ((1 + myPD->y->nT) != NT_TERMS) {
+        psError(PS_ERR_UNKNOWN,true,"myPD->y->nT is %d, should be %d",
+                myPD->y->nT, NT_TERMS-1);
         return 9;
     }
Index: /trunk/psLib/test/math/tst_psFunc00.c
===================================================================
--- /trunk/psLib/test/math/tst_psFunc00.c	(revision 5293)
+++ /trunk/psLib/test/math/tst_psFunc00.c	(revision 5294)
@@ -16,6 +16,6 @@
 *    XXX: Compare to FLT_EPSILON
 * 
-*    @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
-*    @date $Date: 2005-09-22 03:00:31 $
+*    @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
+*    @date $Date: 2005-10-12 21:02:20 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
@@ -65,7 +65,7 @@
     }
     // Verify polynomial structure members set properly
-    if(my1DPoly->COOL_1D_n != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my1DPoly->COOL_1D_n, ORDER);
+    if(my1DPoly->nX != ORDER) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my1DPoly->nX, ORDER);
         return 2;
     }
@@ -117,13 +117,13 @@
     }
     // Verify polynomial structure members set properly
-    if(my2DPoly->COOL_2D_nX != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my2DPoly->COOL_2D_nX, ORDER);
+    if(my2DPoly->nX != ORDER) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my2DPoly->nX, ORDER);
         return 2;
     }
     // Verify polynomial structure members set properly
-    if(my2DPoly->COOL_2D_nY != ORDER+1) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my2DPoly->COOL_2D_nY, ORDER+1);
+    if(my2DPoly->nY != ORDER+1) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my2DPoly->nY, ORDER+1);
         return 3;
     }
@@ -184,19 +184,19 @@
     }
     // Verify polynomial structure members set properly
-    if(my3DPoly->COOL_3D_nX != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my3DPoly->COOL_3D_nX, ORDER);
+    if(my3DPoly->nX != ORDER) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my3DPoly->nX, ORDER);
         return 2;
     }
     // Verify polynomial structure members set properly
-    if(my3DPoly->COOL_3D_nY != ORDER+1) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my3DPoly->COOL_3D_nY, ORDER+1);
+    if(my3DPoly->nY != ORDER+1) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my3DPoly->nY, ORDER+1);
         return 3;
     }
     // Verify polynomial structure members set properly
-    if(my3DPoly->COOL_3D_nZ != ORDER+2) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my3DPoly->COOL_3D_nZ, ORDER+2);
+    if(my3DPoly->nZ != ORDER+2) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my3DPoly->nZ, ORDER+2);
         return 4;
     }
@@ -264,25 +264,25 @@
     }
     // Verify polynomial structure members set properly
-    if(my4DPoly->COOL_4D_nX != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DPoly->COOL_4D_nX, ORDER);
+    if(my4DPoly->nX != ORDER) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my4DPoly->nX, ORDER);
         return 2;
     }
     // Verify polynomial structure members set properly
-    if(my4DPoly->COOL_4D_nY != ORDER+1) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DPoly->COOL_4D_nX, ORDER+1);
+    if(my4DPoly->nY != ORDER+1) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my4DPoly->nX, ORDER+1);
         return 3;
     }
     // Verify polynomial structure members set properly
-    if(my4DPoly->COOL_4D_nZ != ORDER+2) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DPoly->COOL_4D_nZ, ORDER+2);
+    if(my4DPoly->nZ != ORDER+2) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my4DPoly->nZ, ORDER+2);
         return 4;
     }
     // Verify polynomial structure members set properly
-    if(my4DPoly->COOL_4D_nT != ORDER+3) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DPoly->COOL_4D_nT, ORDER+3);
+    if(my4DPoly->nT != ORDER+3) {
+        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
+                my4DPoly->nT, ORDER+3);
         return 5;
     }
Index: /trunk/psModules/src/imsubtract/pmSubtractBias.c
===================================================================
--- /trunk/psModules/src/imsubtract/pmSubtractBias.c	(revision 5293)
+++ /trunk/psModules/src/imsubtract/pmSubtractBias.c	(revision 5294)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-29 21:57:30 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-12 21:02:04 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,6 +26,6 @@
 {
     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->nX is %d\n", poly->nX);
+    for (psS32 i = 0 ; i < (1 + poly->nX) ; i++) {
         printf("poly->coeff[%d] is %f\n", i, poly->coeff[i]);
     }
Index: /trunk/psModules/src/imsubtract/pmSubtractSky.c
===================================================================
--- /trunk/psModules/src/imsubtract/pmSubtractSky.c	(revision 5293)
+++ /trunk/psModules/src/imsubtract/pmSubtractSky.c	(revision 5294)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:43:52 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-12 21:02:04 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -306,15 +306,15 @@
     // polynomial if there are not enough rows/columns in the input image.
 
-    if ((myPoly->COOL_2D_nX + 1) > dataImage->numRows) {
+    if ((myPoly->nX + 1) > dataImage->numRows) {
         psLogMsg(__func__, PS_LOG_WARN,
                  "WARNING: ImageFitPolynomial(): Reducing polynomial complexity in x-dimension.\n");
-        oldPolyX = myPoly->COOL_2D_nX;
-        myPoly->COOL_2D_nX = dataImage->numRows - 1;
-    }
-    if ((myPoly->COOL_2D_nY + 1) > dataImage->numCols) {
+        oldPolyX = myPoly->nX;
+        myPoly->nX = dataImage->numRows - 1;
+    }
+    if ((myPoly->nY + 1) > dataImage->numCols) {
         psLogMsg(__func__, PS_LOG_WARN,
                  "WARNING: ImageFitPolynomial(): Reducing polynomial complexity in y-dimension.\n");
-        oldPolyY = myPoly->COOL_2D_nY;
-        myPoly->COOL_2D_nY = dataImage->numCols - 1;
+        oldPolyY = myPoly->nY;
+        myPoly->nY = dataImage->numCols - 1;
     }
     psS32 i;
@@ -324,8 +324,8 @@
     psS32 aRow;
     psS32 aCol;
-    psS32 **polyTerms = buildPolyTerms(myPoly->COOL_2D_nX, myPoly->COOL_2D_nY);
+    psS32 **polyTerms = buildPolyTerms(myPoly->nX, myPoly->nY);
     // We determine how many coefficients will be in the polynomial that we
     // are fitting to this image.
-    psS32 localPolyTerms = CalculatePolyTerms(myPoly->COOL_2D_nX, myPoly->COOL_2D_nY);
+    psS32 localPolyTerms = CalculatePolyTerms(myPoly->nX, myPoly->nY);
     psImage *A = psImageAlloc(localPolyTerms, localPolyTerms, PS_TYPE_F64);
     psImage *Aout = psImageAlloc(localPolyTerms, localPolyTerms, PS_TYPE_F64);
@@ -345,5 +345,5 @@
         for (y=0;y<dataImage->numCols;y++) {
             if (maskImage->data.U8[x][y] == 0) {
-                buildSums((psF64) x, (psF64) y, myPoly->COOL_2D_nX, myPoly->COOL_2D_nY);
+                buildSums((psF64) x, (psF64) y, myPoly->nX, myPoly->nY);
 
                 /************************************************************
@@ -428,7 +428,7 @@
     //
     if (oldPolyX != -1) {
-        myPoly->COOL_2D_nX = oldPolyX;
-        for (i=oldPolyX ; i < (1 + myPoly->COOL_2D_nX) ; i++) {
-            for (j=0;j<(1 + myPoly->COOL_2D_nY) ; j++) {
+        myPoly->nX = oldPolyX;
+        for (i=oldPolyX ; i < (1 + myPoly->nX) ; i++) {
+            for (j=0;j<(1 + myPoly->nY) ; j++) {
                 myPoly->coeff[i][j] = 0.0;
             }
@@ -436,7 +436,7 @@
     }
     if (oldPolyY != -1) {
-        myPoly->COOL_2D_nY = oldPolyY;
-        for (i=0 ; i < (1 + myPoly->COOL_2D_nX) ; i++) {
-            for (j=oldPolyY;j < (1 + myPoly->COOL_2D_nY) ; j++) {
+        myPoly->nY = oldPolyY;
+        for (i=0 ; i < (1 + myPoly->nX) ; i++) {
+            for (j=oldPolyY;j < (1 + myPoly->nY) ; j++) {
                 myPoly->coeff[i][j] = 0.0;
             }
