Index: trunk/psLib/src/astronomy/psAstrometry.c
===================================================================
--- trunk/psLib/src/astronomy/psAstrometry.c	(revision 3708)
+++ trunk/psLib/src/astronomy/psAstrometry.c	(revision 4029)
@@ -8,6 +8,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-19 00:17:05 $
+ *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-05-25 20:26:55 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -41,5 +41,5 @@
                                    psImage* tmpImage)
 {
-    PS_IMAGE_CHECK_NULL(tmpImage, 0);
+    PS_ASSERT_IMAGE_NON_NULL(tmpImage, 0);
 
     if ((x < 0.0) || (x > (double)tmpImage->numCols) ||
@@ -154,8 +154,8 @@
     psS32 j;
 
-    PS_IMAGE_CHECK_NULL(x, NULL);
-    PS_IMAGE_CHECK_NULL(y, NULL);
-    PS_IMAGE_CHECK_TYPE(x, PS_TYPE_F64, NULL);
-    PS_IMAGE_CHECK_TYPE(y, PS_TYPE_F64, NULL);
+    PS_ASSERT_IMAGE_NON_NULL(x, NULL);
+    PS_ASSERT_IMAGE_NON_NULL(y, NULL);
+    PS_ASSERT_IMAGE_TYPE(x, PS_TYPE_F64, NULL);
+    PS_ASSERT_IMAGE_TYPE(y, PS_TYPE_F64, NULL);
 
     tmp = (psFixedPattern *) psAlloc(sizeof(psFixedPattern));
@@ -211,5 +211,5 @@
                             const psObservatory* observatory)
 {
-    PS_PTR_CHECK_NULL(observatory, NULL);
+    PS_ASSERT_PTR_NON_NULL(observatory, NULL);
 
     psExposure* exp = psAlloc(sizeof(psExposure));
@@ -271,5 +271,5 @@
                   const psExposure* exp)
 {
-    PS_INT_CHECK_NON_NEGATIVE(nChips, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(nChips, NULL);
 
     psFPA* newFPA = psAlloc(sizeof(psFPA));
@@ -315,5 +315,5 @@
                     psFPA *parentFPA)
 {
-    PS_INT_CHECK_NON_NEGATIVE(nCells, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(nCells, NULL);
 
     psChip* chip = psAlloc(sizeof(psChip));
@@ -350,5 +350,5 @@
                     psChip* parentChip)
 {
-    PS_INT_CHECK_NON_NEGATIVE(nReadouts, NULL);
+    PS_ASSERT_INT_NONNEGATIVE(nReadouts, NULL);
 
     psCell* cell = psAlloc(sizeof(psCell));
@@ -406,5 +406,5 @@
 psGrommit* psGrommitAlloc(const psExposure* exp)
 {
-    PS_PTR_CHECK_NULL(exp, NULL);
+    PS_ASSERT_PTR_NON_NULL(exp, NULL);
 
     double date = psTimeToMJD(exp->time);
@@ -436,6 +436,6 @@
                     const psFPA* FPA)
 {
-    PS_PTR_CHECK_NULL(fpaCoord, NULL);
-    PS_PTR_CHECK_NULL(FPA, NULL);
+    PS_ASSERT_PTR_NON_NULL(fpaCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(FPA, NULL);
 
     psChip* tmpChip = NULL;
@@ -461,7 +461,7 @@
                     const psFPA* FPA)
 {
-    PS_PTR_CHECK_NULL(fpaCoord, NULL);
-    PS_PTR_CHECK_NULL(FPA, NULL);
-    PS_PTR_CHECK_NULL(FPA->chips, NULL);
+    PS_ASSERT_PTR_NON_NULL(fpaCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(FPA, NULL);
+    PS_ASSERT_PTR_NON_NULL(FPA->chips, NULL);
 
     psArray* chips = FPA->chips;
@@ -476,6 +476,6 @@
     for (psS32 i = 0; i < nChips; i++) {
         psChip* tmpChip = chips->data[i];
-        PS_PTR_CHECK_NULL(tmpChip, NULL);
-        PS_PTR_CHECK_NULL(tmpChip->fromFPA, NULL);
+        PS_ASSERT_PTR_NON_NULL(tmpChip, NULL);
+        PS_ASSERT_PTR_NON_NULL(tmpChip->fromFPA, NULL);
 
         psPlaneTransformApply(&chipCoord, tmpChip->fromFPA, fpaCoord);
@@ -494,6 +494,6 @@
                      const psChip* chip)
 {
-    PS_PTR_CHECK_NULL(chipCoord, NULL);
-    PS_PTR_CHECK_NULL(chip, NULL);
+    PS_ASSERT_PTR_NON_NULL(chipCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(chip, NULL);
 
     psPlane cellCoord;
@@ -511,6 +511,6 @@
     for (psS32 i = 0; i < cells->n; i++) {
         psCell* tmpCell = (psCell* ) cells->data[i];
-        PS_PTR_CHECK_NULL(tmpCell, NULL);
-        PS_PTR_CHECK_NULL(tmpCell->fromChip, NULL);
+        PS_ASSERT_PTR_NON_NULL(tmpCell, NULL);
+        PS_ASSERT_PTR_NON_NULL(tmpCell->fromChip, NULL);
         psArray* readouts = tmpCell->readouts;
 
@@ -518,5 +518,5 @@
             for (psS32 j = 0; j < readouts->n; j++) {
                 psReadout* tmpReadout = readouts->data[j];
-                PS_READOUT_CHECK_NULL(tmpReadout, NULL);
+                PS_ASSERT_READOUT_NON_NULL(tmpReadout, NULL);
 
                 psPlaneTransformApply(&cellCoord,
@@ -540,6 +540,6 @@
                            const psCell* cell)
 {
-    PS_PTR_CHECK_NULL(inCoord, NULL);
-    PS_PTR_CHECK_NULL(cell, NULL);
+    PS_ASSERT_PTR_NON_NULL(inCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell, NULL);
 
     return (psPlaneTransformApply(outCoord, cell->toChip, inCoord));
@@ -550,6 +550,6 @@
                           const psChip* chip)
 {
-    PS_PTR_CHECK_NULL(inCoord, NULL);
-    PS_PTR_CHECK_NULL(chip, NULL);
+    PS_ASSERT_PTR_NON_NULL(inCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(chip, NULL);
 
     return (psPlaneTransformApply(outCoord, chip->toFPA, inCoord));
@@ -562,6 +562,6 @@
                         const psFPA* fpa)
 {
-    PS_PTR_CHECK_NULL(inCoord, NULL);
-    PS_PTR_CHECK_NULL(fpa, NULL);
+    PS_ASSERT_PTR_NON_NULL(inCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(fpa, NULL);
 
     return(psPlaneDistortApply(outCoord, fpa->toTangentPlane, inCoord,
@@ -576,6 +576,6 @@
                          const psGrommit* grommit)
 {
-    PS_PTR_CHECK_NULL(tpCoord, NULL);
-    PS_PTR_CHECK_NULL(grommit, NULL);
+    PS_ASSERT_PTR_NON_NULL(tpCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(grommit, NULL);
 
     double AOB = 0.0;
@@ -596,6 +596,6 @@
                           const psCell* cell)
 {
-    PS_PTR_CHECK_NULL(cellCoord, NULL);
-    PS_PTR_CHECK_NULL(cell, NULL);
+    PS_ASSERT_PTR_NON_NULL(cellCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell, NULL);
 
     return (psPlaneTransformApply(fpaCoord, cell->toFPA, cellCoord));
@@ -608,11 +608,11 @@
                            const psCell* cell)
 {
-    PS_PTR_CHECK_NULL(cellCoord, NULL);
-    PS_PTR_CHECK_NULL(cell, NULL);
-    PS_PTR_CHECK_NULL(cell->toFPA, NULL);
-    PS_PTR_CHECK_NULL(cell->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent->toTangentPlane, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent->exposure, NULL);
+    PS_ASSERT_PTR_NON_NULL(cellCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->toFPA, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent->toTangentPlane, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent->exposure, NULL);
 
     psPlane* fpaCoord = NULL;
@@ -645,10 +645,10 @@
                                 const psCell* cell)
 {
-    PS_PTR_CHECK_NULL(cellCoord, NULL);
-    PS_PTR_CHECK_NULL(cell, NULL);
-    PS_PTR_CHECK_NULL(cell->toSky, NULL);
-    PS_PTR_CHECK_NULL(cell->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent->projection, NULL);
+    PS_ASSERT_PTR_NON_NULL(cellCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->toSky, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent->projection, NULL);
     if (cell->toSky) {
         // XXX: Should we use toTP or toSky?
@@ -690,6 +690,6 @@
                         const psGrommit* grommit)
 {
-    PS_PTR_CHECK_NULL(in, NULL);
-    PS_PTR_CHECK_NULL(grommit, NULL);
+    PS_ASSERT_PTR_NON_NULL(in, NULL);
+    PS_ASSERT_PTR_NON_NULL(grommit, NULL);
 
     char* type = "RA";
@@ -711,7 +711,7 @@
                         const psFPA* fpa)
 {
-    PS_PTR_CHECK_NULL(tpCoord, NULL);
-    PS_PTR_CHECK_NULL(fpa, NULL);
-    PS_PTR_CHECK_NULL(fpa->fromTangentPlane, NULL);
+    PS_ASSERT_PTR_NON_NULL(tpCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(fpa, NULL);
+    PS_ASSERT_PTR_NON_NULL(fpa->fromTangentPlane, NULL);
 
     return (psPlaneDistortApply(fpaCoord, fpa->fromTangentPlane,
@@ -723,7 +723,7 @@
                           const psChip* chip)
 {
-    PS_PTR_CHECK_NULL(fpaCoord, NULL);
-    PS_PTR_CHECK_NULL(chip, NULL);
-    PS_PTR_CHECK_NULL(chip->fromFPA, NULL);
+    PS_ASSERT_PTR_NON_NULL(fpaCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(chip, NULL);
+    PS_ASSERT_PTR_NON_NULL(chip->fromFPA, NULL);
 
     chipCoord = psPlaneTransformApply(chipCoord, chip->fromFPA, fpaCoord);
@@ -735,7 +735,7 @@
                            const psCell* cell)
 {
-    PS_PTR_CHECK_NULL(chipCoord, NULL);
-    PS_PTR_CHECK_NULL(cell, NULL);
-    PS_PTR_CHECK_NULL(cell->fromChip, NULL);
+    PS_ASSERT_PTR_NON_NULL(chipCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->fromChip, NULL);
 
     cellCoord = psPlaneTransformApply(cellCoord, cell->fromChip, chipCoord);
@@ -749,9 +749,9 @@
                           const psCell* cell)
 {
-    PS_PTR_CHECK_NULL(skyCoord, NULL);
-    PS_PTR_CHECK_NULL(cell, NULL);
-    PS_PTR_CHECK_NULL(cell->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent->grommit, NULL);
+    PS_ASSERT_PTR_NON_NULL(skyCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent->grommit, NULL);
 
     psChip *parChip = cell->parent;
@@ -783,10 +783,10 @@
                                const psCell* cell)
 {
-    PS_PTR_CHECK_NULL(skyCoord, NULL);
-    PS_PTR_CHECK_NULL(cell, NULL);
-    PS_PTR_CHECK_NULL(cell->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent, NULL);
-    PS_PTR_CHECK_NULL(cell->parent->parent->projection, NULL);
-    PS_PTR_CHECK_NULL(cell->toTP, NULL);
+    PS_ASSERT_PTR_NON_NULL(skyCoord, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->parent->parent->projection, NULL);
+    PS_ASSERT_PTR_NON_NULL(cell->toTP, NULL);
     if (cell->toSky) {
         // XXX: Should we use toTP or toSky?
