Index: trunk/psLib/src/fits/psFitsFloat.c
===================================================================
--- trunk/psLib/src/fits/psFitsFloat.c	(revision 17053)
+++ trunk/psLib/src/fits/psFitsFloat.c	(revision 17447)
@@ -153,5 +153,5 @@
             return NULL;
         }
-        assert(out->type.type == PS_TYPE_F32);
+        psAssert(out->type.type == PS_TYPE_F32, "impossible");
         for (int y = 0; y < numRows; y++) {
             for (int x = 0; x < numCols; x++) {
Index: trunk/psLib/src/fits/psFitsHeader.c
===================================================================
--- trunk/psLib/src/fits/psFitsHeader.c	(revision 17053)
+++ trunk/psLib/src/fits/psFitsHeader.c	(revision 17447)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-03-19 20:23:06 $
+ *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -21,4 +21,5 @@
 #include <strings.h>
 
+#include "psAbort.h"
 #include "psAssert.h"
 #include "psFits.h"
@@ -230,5 +231,5 @@
                               )
 {
-    assert(fits);
+    psAssert(fits, "impossible");
 
     psMetadata *header = psMetadataAlloc(); // Header, to return
@@ -414,5 +415,5 @@
         // Need to look for MULTI, which won't be picked up using the iterator.
         psMetadataItem *multiCheckItem = psMetadataLookup(header, item->name);
-        assert(multiCheckItem);
+        psAssert(multiCheckItem, "impossible");
         unsigned int flag = 0;      // Flag to indicate MULTI; otherwise default action
         if (multiCheckItem->type == PS_DATA_METADATA_MULTI) {
Index: trunk/psLib/src/fits/psFitsImage.c
===================================================================
--- trunk/psLib/src/fits/psFitsImage.c	(revision 17053)
+++ trunk/psLib/src/fits/psFitsImage.c	(revision 17447)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-03-11 19:57:41 $
+ *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-04-17 23:43:02 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -253,9 +253,9 @@
                                           )
 {
-    assert(bscale);
-    assert(bzero);
-    assert(floatType);
-    assert(fits);
-    assert(image);
+    psAssert(bscale, "impossible");
+    psAssert(bzero, "impossible");
+    psAssert(floatType, "impossible");
+    psAssert(fits, "impossible");
+    psAssert(image, "impossible");
 
     *bscale = 1.0;
@@ -358,10 +358,10 @@
 {
     // n.b., this assumes contiguous image buffer
-    assert(output);
-    assert(fits);
-    assert(info);
-    assert(output->numCols == info->lastPixel[0] - info->firstPixel[0] + 1);
-    assert(output->numRows == info->lastPixel[1] - info->firstPixel[1] + 1); // Right size
-    assert(!output->parent);            // No parents means the buffer is contiguous
+    psAssert(output, "impossible");
+    psAssert(fits, "impossible");
+    psAssert(info, "impossible");
+    psAssert(output->numCols == info->lastPixel[0] - info->firstPixel[0] + 1, "impossible");
+    psAssert(output->numRows == info->lastPixel[1] - info->firstPixel[1] + 1, "impossible"); // Right size
+    psAssert(!output->parent, "impossible");            // No parents means the buffer is contiguous
 
     int anynull = 0;                    // Are there any NULLs in the data?
@@ -516,10 +516,10 @@
     if (cfitsioBzero != 0.0) {
         // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash!
-        assert(bzero == 0.0 && bscale == 1.0);
+        psAssert(bzero == 0.0 && bscale == 1.0, "impossible");
         bscale = 1.0;
         bzero = cfitsioBzero;
     }
     psFitsOptions *options = fits->options; // FITS I/O options
-    assert(!options || bitPix == options->bitpix || options->bitpix == 0);
+    psAssert(!options || bitPix == options->bitpix || options->bitpix == 0, "impossible");
 
     int naxis = 3;                      // Number of axes
@@ -647,10 +647,10 @@
     if (cfitsioBzero != 0.0) {
         // p_psFitsTypeToCfitsio and imageToDiskRepresentation must not clash!
-        assert(bzero == 0.0 && bscale == 1.0);
+        psAssert(bzero == 0.0 && bscale == 1.0, "impossible");
         bscale = 1.0;
         bzero = cfitsioBzero;
     }
     psFitsOptions *options = fits->options; // FITS I/O options
-    assert(!options || bitPix == options->bitpix || options->bitpix == 0);
+    psAssert(!options || bitPix == options->bitpix || options->bitpix == 0, "impossible");
 
     //check to see if the HDU has the same datatype
Index: trunk/psLib/src/fits/psFitsScale.c
===================================================================
--- trunk/psLib/src/fits/psFitsScale.c	(revision 17053)
+++ trunk/psLib/src/fits/psFitsScale.c	(revision 17447)
@@ -41,8 +41,8 @@
     )
 {
-    assert(bscale);
-    assert(bzero);
-    assert(image);
-    assert(options);
+    psAssert(bscale, "impossible");
+    psAssert(bzero, "impossible");
+    psAssert(image, "impossible");
+    psAssert(options, "impossible");
 
     double range = pow(2.0, options->bitpix); // Range of values for target BITPIX
@@ -101,8 +101,8 @@
     )
 {
-    assert(bscale);
-    assert(bzero);
-    assert(image);
-    assert(options);
+    psAssert(bscale, "impossible");
+    psAssert(bzero, "impossible");
+    psAssert(image, "impossible");
+    psAssert(options, "impossible");
 
     // Measure the mean and stdev
