Index: /trunk/psLib/src/astro/psCoord.c
===================================================================
--- /trunk/psLib/src/astro/psCoord.c	(revision 2103)
+++ /trunk/psLib/src/astro/psCoord.c	(revision 2104)
@@ -10,6 +10,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-14 01:10:58 $
+*  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-14 01:17:50 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,6 @@
 #include "psAbort.h"
 #include "psTime.h"
+#include "psConstants.h"
+#include "psError.h"
 #include <math.h>
 #include <float.h>
Index: /trunk/psLib/src/astronomy/psAstrometry.c
===================================================================
--- /trunk/psLib/src/astronomy/psAstrometry.c	(revision 2103)
+++ /trunk/psLib/src/astronomy/psAstrometry.c	(revision 2104)
@@ -8,6 +8,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 00:12:40 $
+ *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:17:50 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -59,5 +59,5 @@
 {
     int i = 0;
-    PS_CHECK_NULL_PTR_RETURN_NULL(transform);
+    PS_CHECK_NULL_PTR_RETURN_ZERO(transform);
 
     for (i=2;i<(transform->x->nX);i++) {
@@ -214,5 +214,4 @@
 
 /*
- *
  * XXX: Verify that you interpreted the SDR correctly.
  *
@@ -499,11 +498,9 @@
                     const psFPA* FPA)
 {
-    //printf("Entering psCellInFPA()\n");
+    PS_CHECK_NULL_PTR_RETURN_NULL(fpaCoord);
+    PS_CHECK_NULL_PTR_RETURN_NULL(FPA);
     psChip* tmpChip = NULL;
     psPlane chipCoord;
     psCell* outCell = NULL;
-
-    PS_CHECK_NULL_PTR_RETURN_NULL(fpaCoord);
-    PS_CHECK_NULL_PTR_RETURN_NULL(FPA);
 
     // Determine which chip contains the fpaCoords.
@@ -519,5 +516,4 @@
     outCell = psCellInChip(&chipCoord, tmpChip);
 
-    //printf("Exiting psCellInFPA()\n");
     return (outCell);
 }
@@ -526,5 +522,4 @@
                     const psFPA* FPA)
 {
-    //printf("Entering psChipInFPA()\n");
     PS_CHECK_NULL_PTR_RETURN_NULL(fpaCoord);
     PS_CHECK_NULL_PTR_RETURN_NULL(FPA);
@@ -535,10 +530,9 @@
     psCell *tmpCell = NULL;
 
-    // Loop through every chip in this FPA.  Convert the original
-    // FPA coordinates to chip coordinates for that chip.  Then,
-    // determine if any cells in that chip contain those chip
-    // coordinates.
+    // Loop through every chip in this FPA.  Convert the original FPA
+    // coordinates to chip coordinates for that chip.  Then, determine if any
+    // cells in that chip contain those chip coordinates.
+
     for (int i = 0; i < nChips; i++) {
-        //printf("HERE 01 (checking chip %d)\n", i);
         psChip* tmpChip = chips->data[i];
         psPlaneTransformApply(&chipCoord, tmpChip->fromFPA, fpaCoord);
@@ -546,10 +540,8 @@
         tmpCell = psCellInChip(&chipCoord, tmpChip);
         if (tmpCell != NULL) {
-            //printf("Exiting psChipInFPA()\n");
             return(tmpChip);
         }
     }
 
-    //printf("Exiting psChipInFPA()\n");
     return (NULL);
 }
@@ -558,5 +550,4 @@
                      const psChip* chip)
 {
-    //printf("Entering psCellInChip(%f, %f, %d)\n", chipCoord->x, chipCoord->y, chip);
     PS_CHECK_NULL_PTR_RETURN_NULL(chipCoord);
     PS_CHECK_NULL_PTR_RETURN_NULL(chip);
@@ -567,5 +558,4 @@
     cells = chip->cells;
     if (cells == NULL) {
-        //printf("Exiting psCellInChip()\n");
         return NULL;
     }
@@ -590,5 +580,4 @@
                                           cellCoord.y,
                                           tmpReadout->image)) {
-                    //printf("Exiting psCellInChip()\n");
                     return (tmpCell);
                 }
@@ -597,5 +586,4 @@
     }
 
-    //printf("Exiting psCellInChip()\n");
     return (NULL);
 }
@@ -641,9 +629,10 @@
                          const psGrommit* grommit)
 {
+    PS_CHECK_NULL_PTR_RETURN_NULL(tpCoord);
+    PS_CHECK_NULL_PTR_RETURN_NULL(grommit);
+
     double AOB = 0.0;
     double ZOB = 0.0;
     double HOB = 0.0;
-    PS_CHECK_NULL_PTR_RETURN_NULL(tpCoord);
-    PS_CHECK_NULL_PTR_RETURN_NULL(grommit);
     if (outSphere == NULL) {
         outSphere = (psSphere* ) psAlloc(sizeof(psSphere));
@@ -740,8 +729,8 @@
                         const psGrommit* grommit)
 {
-    char* type = "RA";
-
     PS_CHECK_NULL_PTR_RETURN_NULL(in);
     PS_CHECK_NULL_PTR_RETURN_NULL(grommit);
+
+    char* type = "RA";
 
     if (tpCoord == NULL) {
@@ -775,7 +764,6 @@
     PS_CHECK_NULL_PTR_RETURN_NULL(chip);
     PS_CHECK_NULL_PTR_RETURN_NULL(chip->parent);
-    //    psFPA *FPA = chip->parent;
+
     chipCoord = psPlaneTransformApply(chipCoord, chip->fromFPA, fpaCoord);
-
     return(chipCoord);
 }
@@ -790,5 +778,4 @@
 
     cellCoord = psPlaneTransformApply(cellCoord, cell->fromChip, chipCoord);
-
     return(cellCoord);
 }
Index: /trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- /trunk/psLib/src/astronomy/psCoord.c	(revision 2103)
+++ /trunk/psLib/src/astronomy/psCoord.c	(revision 2104)
@@ -10,6 +10,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-14 01:10:58 $
+*  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-14 01:17:50 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,6 @@
 #include "psAbort.h"
 #include "psTime.h"
+#include "psConstants.h"
+#include "psError.h"
 #include <math.h>
 #include <float.h>
