Index: /trunk/psModules/test/astrom/tst_pmAstrometry01.c
===================================================================
--- /trunk/psModules/test/astrom/tst_pmAstrometry01.c	(revision 6528)
+++ /trunk/psModules/test/astrom/tst_pmAstrometry01.c	(revision 6529)
@@ -5,6 +5,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-03-04 01:01:33 $
+*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-03-06 22:53:47 $
 *
 * XXX: Add tests were the coordinate does not transform to any legitimate cell
@@ -248,5 +248,8 @@
     psPlane cellCoord;
     psPlane testCoord;
-    psSphere skyCoord;
+    psSphere *skyCoord = psSphereAlloc();
+    // XXX: This code causes a seg fault.
+    //    psSphere skyTmp;
+    //    psMemCheckType(PS_DATA_SPHERE, &skyTmp);
     psPlane tpCoord;
     psS32 testStatus = 0;
@@ -340,4 +343,5 @@
                     if (VERBOSE) {
                         printf("------------------ (%.2f, %.2f) ------------------\n", fpaCoord.x, fpaCoord.y);
+                        printf("(chip, cell, x, y) is (%d, %d, %d, %d)\n", chip, cell, x, y);
                     }
                     pmChip* tmpChip = pmChipInFPA(&fpaCoord, myFPA);
@@ -405,9 +409,9 @@
                         //
                         if (1) {
-                            psSphere *rc = pmCoordTPToSky(&skyCoord, &testCoord, myFPA->projection);
+                            psSphere *rc = pmCoordTPToSky(skyCoord, &testCoord, myFPA->projection);
                             if (rc == NULL) {
                                 printf("pmCoordTPToSky() failed.\n");
                             } else {
-                                psPlane *rc = pmCoordSkyToTP(&tpCoord, &skyCoord, myFPA->projection);
+                                psPlane *rc = pmCoordSkyToTP(&tpCoord, skyCoord, myFPA->projection);
                                 if (rc == NULL) {
                                     printf("pmCoordSkyToTP() failed.\n");
@@ -422,5 +426,5 @@
                                     }
                                     if (VERBOSE) {
-                                        printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord.r, skyCoord.d, tpCoord.x, tpCoord.y);
+                                        printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord->r, skyCoord->d, tpCoord.x, tpCoord.y);
                                     }
                                 }
@@ -433,9 +437,9 @@
                         if (1) {
                             psPlane tmpCellCoord;
-                            psSphere *rc = pmCoordCellToSky(&skyCoord, &cellCoord, 0.0, 0.0, myCell);
+                            psSphere *rc = pmCoordCellToSky(skyCoord, &cellCoord, 0.0, 0.0, myCell);
                             if (rc == NULL) {
                                 printf("pmCoordCellToSky() failed.\n");
                             } else {
-                                psPlane *rc = pmCoordSkyToCell(&tmpCellCoord, &skyCoord, 0.0, 0.0, myCell);
+                                psPlane *rc = pmCoordSkyToCell(&tmpCellCoord, skyCoord, 0.0, 0.0, myCell);
                                 if (rc == NULL) {
                                     printf("pmCoordSkyToCell() failed.\n");
@@ -450,5 +454,5 @@
                                     }
                                     if (VERBOSE) {
-                                        printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord.r, skyCoord.d, tmpCellCoord.x, tmpCellCoord.y);
+                                        printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord->r, skyCoord->d, tmpCellCoord.x, tmpCellCoord.y);
                                     }
                                 }
@@ -464,9 +468,9 @@
                         if ((NUM_CHIPS == 1) && (NUM_CELLS == 1)) {
                             psPlane tmpCellCoord;
-                            psSphere *rc = pmCoordCellToSkyQuick(&skyCoord, &cellCoord, myCell);
+                            psSphere *rc = pmCoordCellToSkyQuick(skyCoord, &cellCoord, myCell);
                             if (rc == NULL) {
                                 printf("pmCoordCellToSkyQuick() failed.\n");
                             } else {
-                                psPlane *rc = pmCoordSkyToCellQuick(&tmpCellCoord, &skyCoord, myCell);
+                                psPlane *rc = pmCoordSkyToCellQuick(&tmpCellCoord, skyCoord, myCell);
                                 if (rc == NULL) {
                                     printf("pmCoordSkyToCellQuick() failed.\n");
@@ -481,5 +485,5 @@
                                     }
                                     if (VERBOSE) {
-                                        printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord.r, skyCoord.d, tmpCellCoord.x, tmpCellCoord.y);
+                                        printf("(%.2f %.2f) -> (%.2f %.2f) -> (%.2f %.2f)\n", testCoord.x, testCoord.y, skyCoord->r, skyCoord->d, tmpCellCoord.x, tmpCellCoord.y);
                                     }
                                 }
@@ -512,4 +516,5 @@
     }
     psFree(myFPA);
+    psFree(skyCoord);
 
     return(testStatus);
