Index: trunk/psModules/src/camera/pmFPA.c
===================================================================
--- trunk/psModules/src/camera/pmFPA.c	(revision 7946)
+++ trunk/psModules/src/camera/pmFPA.c	(revision 8047)
@@ -12,6 +12,6 @@
 * XXX: Should we implement non-linear cell->chip transforms?
 *
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-06-22 20:03:50 $
+*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-08-02 02:17:11 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -187,5 +187,5 @@
     readout->weight = NULL;
     readout->mask = NULL;
-    readout->bias = NULL;
+    readout->bias = psListAlloc(NULL);
 }
 
@@ -455,4 +455,49 @@
         pmReadout *readout = cell->readouts->data[i];
         readout->file_exists = status;
+    }
+    return true;
+}
+
+bool pmFPACheckFileStatus(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 (!pmChipCheckFileStatus(chip)) {
+            return false;
+        }
+    }
+    return true;
+}
+
+bool pmChipCheckFileStatus(const pmChip *chip)
+{
+    PS_ASSERT_PTR_NON_NULL(chip, false);
+    if (!chip->file_exists) {
+        return false;
+    }
+
+    for (int i = 0; i < chip->cells->n; i++) {
+        pmCell *cell = chip->cells->data[i];
+        if (!pmCellCheckFileStatus(cell)) {
+            return false;
+        }
+    }
+    return true;
+}
+
+bool pmCellCheckFileStatus(const pmCell *cell)
+{
+    PS_ASSERT_PTR_NON_NULL(cell, false);
+    if (!cell->file_exists) {
+        return false;
+    }
+
+    for (int i = 0; i < cell->readouts->n; i++) {
+        pmReadout *readout = cell->readouts->data[i];
+        if (!readout->file_exists) {
+            return false;
+        }
     }
     return true;
Index: trunk/psModules/src/camera/pmFPA.h
===================================================================
--- trunk/psModules/src/camera/pmFPA.h	(revision 7946)
+++ trunk/psModules/src/camera/pmFPA.h	(revision 8047)
@@ -7,6 +7,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-06-22 20:03:50 $
+*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-08-02 02:17:11 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -230,4 +230,9 @@
 bool pmCellSetFileStatus (pmCell *cell, bool status);
 
+/* Functions to check the file_exists flags */
+bool pmFPACheckFileStatus(const pmFPA *fpa);
+bool pmChipCheckFileStatus(const pmChip *chip);
+bool pmCellCheckFileStatus(const pmCell *cell);
+
 /* functions to turn on/off the data_exists flags */
 bool pmFPASetDataStatus (pmFPA *fpa, bool status);
Index: trunk/psModules/src/camera/pmFPAview.c
===================================================================
--- trunk/psModules/src/camera/pmFPAview.c	(revision 7946)
+++ trunk/psModules/src/camera/pmFPAview.c	(revision 8047)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-06-28 05:12:19 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-02 02:17:11 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,11 +30,21 @@
     psMemSetDeallocator(view, (psFreeFunc) pmFPAviewFree);
 
+    view->nRows = nRows;
+    pmFPAviewReset(view);
+    return view;
+}
+
+
+bool pmFPAviewReset(pmFPAview *view)
+{
+    PS_ASSERT_PTR_NON_NULL(view, false);
+
     view->chip    = -1;
     view->cell    = -1;
     view->readout = -1;
     view->iRows   =  0;
-    view->nRows   = nRows;
-    return view;
-}
+    return true;
+}
+
 
 pmFPALevel pmFPAviewLevel(const pmFPAview *view)
Index: trunk/psModules/src/camera/pmFPAview.h
===================================================================
--- trunk/psModules/src/camera/pmFPAview.h	(revision 7946)
+++ trunk/psModules/src/camera/pmFPAview.h	(revision 8047)
@@ -7,6 +7,6 @@
 *  @author EAM, IfA
 *
-*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-06-17 01:50:43 $
+*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-08-02 02:17:11 $
 *
 *  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
@@ -33,4 +33,7 @@
 // allocate a pmFPAview structure for this fpa and camera
 pmFPAview *pmFPAviewAlloc (int nRows);
+
+// Reset a view
+bool pmFPAviewReset(pmFPAview *view);
 
 // determine the current view level
