Index: /trunk/psModules/src/camera/pmHDU.c
===================================================================
--- /trunk/psModules/src/camera/pmHDU.c	(revision 9603)
+++ /trunk/psModules/src/camera/pmHDU.c	(revision 9604)
@@ -42,5 +42,4 @@
     psFree(hdu->header);
     psFree(hdu->images);
-    psFree(hdu->table);
     psFree(hdu->weights);
     psFree(hdu->masks);
@@ -52,6 +51,5 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-pmHDU *pmHDUAlloc(const char *extname   // Extension name
-                 )
+pmHDU *pmHDUAlloc(const char *extname)
 {
     pmHDU *hdu = psAlloc(sizeof(pmHDU));
@@ -68,5 +66,4 @@
     hdu->header  = NULL;
     hdu->images  = NULL;
-    hdu->table   = NULL;
     hdu->weights = NULL;
     hdu->masks   = NULL;
@@ -75,7 +72,5 @@
 }
 
-bool pmHDUReadHeader(pmHDU *hdu,        // HDU for which to read header
-                     psFits *fits       // FITS file from which to read
-                    )
+bool pmHDUReadHeader(pmHDU *hdu, psFits *fits)
 {
     PS_ASSERT_PTR_NON_NULL(hdu, false);
@@ -100,9 +95,6 @@
 }
 
-// Read the HDU
 // XXX: Add a region specifier?
-bool pmHDURead(pmHDU *hdu,              // HDU to read
-               psFits *fits             // FITS file to read from
-              )
+bool pmHDURead(pmHDU *hdu, psFits *fits)
 {
     PS_ASSERT_PTR_NON_NULL(hdu, false);
@@ -119,41 +111,19 @@
     }
 
-    #ifdef FITS_TABLES
-    // What type is it?
-    if (psFitsIsImage(hdu->header)) {
-        #endif
-        if (hdu->images) {
-            psLogMsg(__func__, PS_LOG_WARN, "HDU %s has already been read --- overwriting.\n", hdu->extname);
-            psFree(hdu->images);        // Blow away anything existing
-        }
-        psTrace("psModules.camera", 5, "Reading the pixels...\n");
-        hdu->images = psFitsReadImageCube(fits, psRegionSet(0,0,0,0));
-        if (! hdu->images) {
-            psError(PS_ERR_IO, false, "Unable to read pixels for extension %s\n", hdu->extname);
-            return false;
-        }
-        return true;
-        #ifdef FITS_TABLES
-
+    if (hdu->images) {
+        psLogMsg(__func__, PS_LOG_WARN, "HDU %s has already been read --- overwriting.\n", hdu->extname);
+        psFree(hdu->images);        // Blow away anything existing
     }
-    if (psFitsIsTable(hdu->table)) {
-        // Read the table
-        if (hdu->table) {
-            psFree(hdu->table);         // Blow away anything existing
-        }
-        hdu->table = psFitsReadTable(fits);
-        return true;
+    psTrace("psModules.camera", 5, "Reading the pixels...\n");
+    hdu->images = psFitsReadImageCube(fits, psRegionSet(0,0,0,0));
+    if (! hdu->images) {
+        psError(PS_ERR_IO, false, "Unable to read pixels for extension %s\n", hdu->extname);
+        return false;
     }
-
-    psError(PS_ERR_UNKNOWN, true, "No idea what this HDU consists of!\n");
-    return false;
-    #endif
+    return true;
 }
 
-// Write the HDU
 // XXX: Add a region specifier?
-bool pmHDUWrite(pmHDU *hdu,             // HDU to write
-                psFits *fits            // FITS file to write to
-               )
+bool pmHDUWrite(pmHDU *hdu, psFits *fits)
 {
     PS_ASSERT_PTR_NON_NULL(hdu, false);
@@ -188,19 +158,4 @@
     }
 
-    #ifdef FITS_TABLES
-    if (hdu->images && (!hdu->table || psFitsIsImage(hdu->header))) {
-        psFitsWriteImageCube(fits, hdu->header, hdu->images, extname);
-        return true;
-    }
-
-    if (hdu->table && (!hdu->images || psFitsIsTable(hdu->header))) {
-        bool psFitsWriteTable(psFits* fits, const psMetadata *header, const psArray* table);
-        return true;
-    }
-
-    psError(PS_ERR_IO, true, "No idea what this HDU consists of!\n");
-    return false;
-    #else
-
     if (hdu->images) {
         psTrace("psModules.camera", 9, "Writing pixels for %s\n", hdu->extname);
@@ -211,5 +166,4 @@
     }
     return true;
-    #endif
 }
 
Index: /trunk/psModules/src/camera/pmHDU.h
===================================================================
--- /trunk/psModules/src/camera/pmHDU.h	(revision 9603)
+++ /trunk/psModules/src/camera/pmHDU.h	(revision 9604)
@@ -1,36 +1,52 @@
+/// @file pmHDU.h
+///
+/// @brief Define a header data unit (from a FITS file), with functions to read and write
+///
+/// @ingroup Camera
+///
+/// @author Paul Price, IfA
+///
+/// @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+/// @date $Date: 2006-10-17 03:35:58 $
+///
+/// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
+///
+
 #ifndef PM_HDU_H
 #define PM_HDU_H
 
-// An instance of the FITS Header Data Unit
+/// An instance of the FITS Header Data Unit
+///
+/// Of course, it is not an exact replica of a FITS HDU --- they have no mask and weight data, but these are
+/// stored here for convenience --- it keeps all the relevant data about the image in one place.
 typedef struct
 {
-    psString extname;                   // The extension name
-    bool blankPHU;                      // Is this a blank FITS Primary Header Unit, i.e., no data?
-    psMetadata *format;                 // The camera format
-    psMetadata *header;                 // The FITS header, or NULL if primary for FITS; or section info
-    psArray *images;                    // The pixel data
-    psArray *weights;                   // The pixel data
-    psArray *masks;                     // The pixel data
-    psArray *table;                     // The table data
+    psString extname;                   ///< The extension name
+    bool blankPHU;                      ///< Is this a blank FITS Primary Header Unit, i.e., no data?
+    psMetadata *format;                 ///< The camera format
+    psMetadata *header;                 ///< The FITS header, or NULL if primary for FITS; or section info
+    psArray *images;                    ///< The pixel data
+    psArray *weights;                   ///< The pixel data
+    psArray *masks;                     ///< The pixel data
 }
 pmHDU;
 
 
-// Allocators
+/// Allocator for pmHDU
 pmHDU *pmHDUAlloc(const char *extname);
 
-// Read the header
-bool pmHDUReadHeader(pmHDU *hdu,        // HDU for which to read header
-                     psFits *fits       // FITS file from which to read
+/// Read the HDU header only
+bool pmHDUReadHeader(pmHDU *hdu,        ///< HDU for which to read header
+                     psFits *fits       ///< FITS file from which to read
                     );
 
-// Read the HDU
-bool pmHDURead(pmHDU *hdu,              // HDU to read
-               psFits *fits             // FITS file to read from
+/// Read the HDU header and pixels
+bool pmHDURead(pmHDU *hdu,              ///< HDU to read
+               psFits *fits             ///< FITS file to read from
               );
 
-// Write the HDU
-bool pmHDUWrite(pmHDU *hdu,             // HDU to write
-                psFits *fits            // FITS file to write to
+/// Write the HDU header and pixels
+bool pmHDUWrite(pmHDU *hdu,             ///< HDU to write
+                psFits *fits            ///< FITS file to write to
                );
 
