Index: trunk/psLib/src/astro/psCoord.c
===================================================================
--- trunk/psLib/src/astro/psCoord.c	(revision 15050)
+++ trunk/psLib/src/astro/psCoord.c	(revision 15254)
@@ -10,6 +10,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.140 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-09-28 00:37:27 $
+ *  @version $Revision: 1.141 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-10-09 19:25:44 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -765,7 +765,7 @@
                 for (psS32 j = 0 ; j < orderY+1 ; j++) {
                     myPT->x->coeff[i][j] = 0.0;
-                    myPT->x->mask[i][j] = 0;
                     myPT->y->coeff[i][j] = 0.0;
-                    myPT->y->mask[i][j] = 0;
+                    myPT->x->coeffMask[i][j] = PS_POLY_MASK_NONE;
+                    myPT->y->coeffMask[i][j] = PS_POLY_MASK_NONE;
                 }
             }
@@ -807,24 +807,26 @@
         for (psS32 t2y = 0 ; t2y < (trans2->x->nY + 1) ; t2y++) {
             psTrace("psLib.astro", 6, "X: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y);
-            if (trans2->x->mask[t2x][t2y] == 0) {
-                psTrace("psLib.astro", 6, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y);
-                psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]);
-
-                if (psTraceGetLevel("psLib.astro") >= 6) {
-                    PS_POLY_PRINT_2D(newPoly);
-                }
-
-                // Set the appropriate coeffs in myPT->x
-                for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) {
-                    for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) {
-                        myPT->x->coeff[i][j]+= newPoly->coeff[i][j] * trans2->x->coeff[t2x][t2y];
-                    }
-                }
-
-                if (psTraceGetLevel("psLib.astro") >= 6) {
-                    PS_POLY_PRINT_2D(myPT->x);
-                }
-                psFree(newPoly);
-            }
+            if (trans2->x->coeffMask[t2x][t2y] & PS_POLY_MASK_SET) {
+		continue;
+	    }
+
+	    psTrace("psLib.astro", 6, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y);
+	    psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]);
+
+	    if (psTraceGetLevel("psLib.astro") >= 6) {
+		PS_POLY_PRINT_2D(newPoly);
+	    }
+
+	    // Set the appropriate coeffs in myPT->x
+	    for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) {
+		for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) {
+		    myPT->x->coeff[i][j]+= newPoly->coeff[i][j] * trans2->x->coeff[t2x][t2y];
+		}
+	    }
+
+	    if (psTraceGetLevel("psLib.astro") >= 6) {
+		PS_POLY_PRINT_2D(myPT->x);
+	    }
+	    psFree(newPoly);
         }
     }
@@ -841,23 +843,24 @@
         for (psS32 t2y = 0 ; t2y < (trans2->y->nY + 1) ; t2y++) {
             psTrace("psLib.astro", 5, "Y: -------------------- (t2x, t2y) (%d, %d) --------------------\n", t2x, t2y);
-            if (trans2->y->mask[t2x][t2y] == 0) {
-                psTrace("psLib.astro", 5, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y);
-                psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]);
-
-                if (psTraceGetLevel("psLib.astro") >= 6) {
-                    PS_POLY_PRINT_2D(newPoly);
-                }
-
-                // Set the appropriate coeffs in myPT->x
-                for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) {
-                    for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) {
-                        myPT->y->coeff[i][j]+= newPoly->coeff[i][j] * trans2->y->coeff[t2x][t2y];
-                    }
-                }
-                if (psTraceGetLevel("psLib.astro") >= 6) {
-                    PS_POLY_PRINT_2D(myPT->x);
-                }
-                psFree(newPoly);
-            }
+            if (trans2->y->coeffMask[t2x][t2y] & PS_POLY_MASK_SET) {
+		continue;
+	    }
+	    psTrace("psLib.astro", 5, "In this iteration, we raise trans1->x to the %d power and trans1->y to the %d-power.\n", t2x, t2y);
+	    psPolynomial2D *newPoly = multiplyDPoly2D(trans1XPolys[t2x], trans1YPolys[t2y]);
+
+	    if (psTraceGetLevel("psLib.astro") >= 6) {
+		PS_POLY_PRINT_2D(newPoly);
+	    }
+
+	    // Set the appropriate coeffs in myPT->x
+	    for (psS32 i = 0 ; i < (1 + newPoly->nX) ; i++) {
+		for (psS32 j = 0 ; j < (1 + newPoly->nY) ; j++) {
+		    myPT->y->coeff[i][j]+= newPoly->coeff[i][j] * trans2->y->coeff[t2x][t2y];
+		}
+	    }
+	    if (psTraceGetLevel("psLib.astro") >= 6) {
+		PS_POLY_PRINT_2D(myPT->x);
+	    }
+	    psFree(newPoly);
         }
     }
