Index: trunk/psLib/src/astro/psCoord.c
===================================================================
--- trunk/psLib/src/astro/psCoord.c	(revision 5090)
+++ 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
