Index: trunk/psModules/src/camera/pmFPAConstruct.c
===================================================================
--- trunk/psModules/src/camera/pmFPAConstruct.c	(revision 13189)
+++ trunk/psModules/src/camera/pmFPAConstruct.c	(revision 13190)
@@ -12,7 +12,7 @@
 #include "pmFPA.h"
 #include "pmFPALevel.h"
+#include "pmFPAview.h"
 #include "pmFPAFlags.h"
 #include "pmConcepts.h"
-#include "pmFPAview.h"
 #include "pmFPAConstruct.h"
 #include "pmFPAUtils.h"
Index: trunk/psModules/src/camera/pmFPAFlags.c
===================================================================
--- trunk/psModules/src/camera/pmFPAFlags.c	(revision 13189)
+++ trunk/psModules/src/camera/pmFPAFlags.c	(revision 13190)
@@ -8,4 +8,6 @@
 #include "pmHDU.h"
 #include "pmFPA.h"
+#include "pmFPALevel.h"
+#include "pmFPAview.h"
 #include "pmFPAFlags.h"
 
@@ -128,4 +130,79 @@
 }
 
+// pmFPA does not have its own data_exists flag; check its children
+bool pmFPACheckDataStatus (const pmFPA *fpa) {
+
+    PS_ASSERT_PTR_NON_NULL(fpa, false);
+
+    for (int i = 0; i < fpa->chips->n; i++) {
+	pmChip *chip = fpa->chips->data[i];
+	if (chip == NULL) continue;
+	if (chip->data_exists) return true;
+    }
+    return false;
+}
+
+bool pmChipCheckDataStatus (const pmChip *chip) {
+
+    PS_ASSERT_PTR_NON_NULL(chip, false);
+
+    return (chip->data_exists);
+}
+
+bool pmCellCheckDataStatus (const pmCell *cell) {
+
+    PS_ASSERT_PTR_NON_NULL(cell, false);
+
+    return (cell->data_exists);
+}
+
+bool pmReadoutCheckDataStatus (const pmReadout *readout) {
+
+    PS_ASSERT_PTR_NON_NULL(readout, false);
+
+    return (readout->data_exists);
+}
+
+bool pmFPAviewCheckDataStatus (const pmFPA *fpa, const pmFPAview *view) {
+
+    PS_ASSERT_PTR_NON_NULL(fpa, false);
+    PS_ASSERT_PTR_NON_NULL(view, false);
+
+    if (view->chip == -1) {
+	bool exists = pmFPACheckDataStatus (fpa);
+	return exists;
+    }
+
+    if (view->chip >= fpa->chips->n) {
+	psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n);
+	return false;
+    }
+    pmChip *chip = fpa->chips->data[view->chip];
+
+    if (view->cell == -1) {
+	bool exists = pmChipCheckDataStatus (chip);
+	return exists;
+    }
+
+    if (view->cell >= chip->cells->n) {
+	psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n);
+	return false;
+    }
+    pmCell *cell = chip->cells->data[view->cell];
+
+    if (view->readout == -1) {
+	bool exists = pmCellCheckDataStatus (cell);
+	return exists;
+    }
+
+    if (view->readout >= cell->readouts->n) {
+	psError(PS_ERR_IO, true, "Requested readout == %d >= cell->readouds->n == %ld", view->readout, cell->readouts->n);
+	return false;
+    }
+    pmReadout *readout = cell->readouts->data[view->readout];
+
+    bool exists = pmReadoutCheckDataStatus (readout);
+    return exists;
+}
 
 // Set cells within a chip to be processed or not
Index: trunk/psModules/src/camera/pmFPAFlags.h
===================================================================
--- trunk/psModules/src/camera/pmFPAFlags.h	(revision 13189)
+++ trunk/psModules/src/camera/pmFPAFlags.h	(revision 13190)
@@ -6,6 +6,6 @@
  *  @author Eugene Magnier, IfA
  * 
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-30 21:12:56 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-05-03 20:04:01 $
  *  Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -65,4 +65,29 @@
                         );
 
+
+// Functions the check the data_exists flags
+
+/// Check data_exists for the element of this fpa at this view
+bool pmFPAviewCheckDataStatus (const pmFPA *fpa, ///< FPA to check
+			       const pmFPAview *view ///< check for this view 
+  );
+
+/// Check data_exists for this fpa
+bool pmFPACheckDataStatus (const pmFPA *fpa ///< FPA to check
+  );
+
+/// Check data_exists for this chip
+bool pmChipCheckDataStatus (const pmChip *chip ///< Chip to check
+);
+
+/// Check data_exists for this cell
+bool pmCellCheckDataStatus (const pmCell *cell ///< Cell to check
+);
+
+/// Check data_exists for this readout
+bool pmReadoutCheckDataStatus (const pmReadout *readout ///< Readout to check
+);
+
+
 // Functions to set the process flags
 
Index: trunk/psModules/src/camera/pmFPAMosaic.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMosaic.c	(revision 13189)
+++ trunk/psModules/src/camera/pmFPAMosaic.c	(revision 13190)
@@ -9,4 +9,6 @@
 #include "pmHDU.h"
 #include "pmFPA.h"
+#include "pmFPALevel.h"
+#include "pmFPAview.h"
 #include "pmFPAFlags.h"
 #include "pmConceptsAverage.h"
Index: trunk/psModules/src/camera/pmFPARead.c
===================================================================
--- trunk/psModules/src/camera/pmFPARead.c	(revision 13189)
+++ trunk/psModules/src/camera/pmFPARead.c	(revision 13190)
@@ -12,4 +12,5 @@
 #include "pmFPA.h"
 #include "pmFPALevel.h"
+#include "pmFPAview.h"
 #include "pmFPAFlags.h"
 #include "pmHDUUtils.h"
