Index: trunk/psLib/src/fits/psFits.c
===================================================================
--- trunk/psLib/src/fits/psFits.c	(revision 15179)
+++ trunk/psLib/src/fits/psFits.c	(revision 15335)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-10-03 21:27:21 $
+ *  @version $Revision: 1.73 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-10-19 23:52:39 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -163,4 +163,7 @@
     fits->extword = NULL;
     fits->conventions.compression = true;
+    fits->conventions.psBitpix = true;
+    fits->bscale = 0.0;
+    fits->bzero = 0.0;
     psMemSetDeallocator(fits,(psFreeFunc)fitsFree);
 
@@ -397,10 +400,5 @@
 {
     PS_ASSERT_FITS_NON_NULL(fits, false);
-
-    if (! fits->writable) {
-        psError(PS_ERR_IO, true,
-                _("The psFits object is not writable."));
-        return false;
-    }
+    PS_ASSERT_FITS_WRITABLE(fits, false);
 
     // move to the specified HDU
@@ -431,11 +429,6 @@
 {
     PS_ASSERT_FITS_NON_NULL(fits, false);
+    PS_ASSERT_FITS_WRITABLE(fits, false);
     PS_ASSERT_STRING_NON_EMPTY(extname, false);
-
-    if (! fits->writable) {
-        psError(PS_ERR_IO, true,
-                _("The psFits object is not writable."));
-        return false;
-    }
 
     // move to the specified HDU
@@ -509,11 +502,6 @@
 bool psFitsTruncate(psFits* fits)
 {
-    PS_ASSERT_FITS_NON_NULL(fits, NULL);
-
-    if (! fits->writable) {
-        psError(PS_ERR_IO, true,
-                _("The psFits object is not writable."));
-        return PS_FITS_TYPE_NONE;
-    }
+    PS_ASSERT_FITS_NON_NULL(fits, false);
+    PS_ASSERT_FITS_WRITABLE(fits, false);
 
     int newEnd = psFitsGetExtNum(fits);
@@ -547,4 +535,5 @@
 {
     PS_ASSERT_FITS_NON_NULL(fits, false);
+    PS_ASSERT_FITS_WRITABLE(fits, false);
 
     // convert psFitsCompressionType to cfitsio compression types
