Index: /trunk/psModules/src/objects/pmSourceIO.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO.c	(revision 12702)
+++ /trunk/psModules/src/objects/pmSourceIO.c	(revision 12703)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-30 21:12:56 $
+ *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-03-31 03:01:34 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -445,7 +445,10 @@
 bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
+    chip->data_exists = false;
     for (int i = 0; i < chip->cells->n; i++) {
         pmCell *cell = chip->cells->data[i];
         pmCellReadObjects (cell, view, file, config);
+	if (!cell->data_exists) continue;
+	chip->data_exists = true;
     }
     return true;
@@ -462,7 +465,11 @@
     }
 
+    cell->data_exists = false;
     for (int i = 0; i < cell->readouts->n; i++) {
         pmReadout *readout = cell->readouts->data[i];
         pmReadoutReadObjects (readout, view, file, config);
+	if (!readout->data_exists) {
+	    continue;
+	}
 
 	// load in the concept information for this cell
@@ -472,5 +479,4 @@
 	    psWarning("Difficulty reading concepts for cell; attempting to proceed.");
 	}
-
         cell->data_exists = true;
     }
@@ -560,5 +566,11 @@
 	// advance to the IMAGE HEADER extension
         if (hdu->header == NULL) {
-            psFitsMoveExtName (file->fits, headname);
+	    // if the IMAGE header does not exist, we have no data for this view
+            if (!psFitsMoveExtName (file->fits, headname)) {
+		readout->data_exists = false;
+		psFree (headname);
+		psFree (dataname);
+		return true;
+	    }
             hdu->header = psFitsReadHeader (NULL, file->fits);
         }
@@ -574,4 +586,5 @@
 	
 	// advance to the table data extension
+	// since we have read the IMAGE header, the TABLE header should exist
         if (!psFitsMoveExtName (file->fits, dataname)) {
             psAbort("cannot find data extension %s in %s", dataname, file->filename);
