Index: trunk/psModules/src/camera/pmFPAview.c
===================================================================
--- trunk/psModules/src/camera/pmFPAview.c	(revision 11687)
+++ trunk/psModules/src/camera/pmFPAview.c	(revision 12585)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-07 23:58:17 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-03-24 17:53:55 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -51,4 +51,25 @@
 }
 
+// return a view restricted to the level (must be >= the input level)
+pmFPAview *pmFPAviewForLevel(pmFPALevel level, const pmFPAview *input) 
+{
+    PS_ASSERT_PTR_NON_NULL(input, NULL);
+
+    pmFPAview *output = pmFPAviewAlloc (input->nRows);
+    *output = *input;
+
+    switch (level) {
+      case PM_FPA_LEVEL_FPA:
+	output->chip = -1;
+      case PM_FPA_LEVEL_CHIP:
+	output->cell = -1;
+      case PM_FPA_LEVEL_CELL:
+	output->readout = -1;
+	break;
+      default:
+	break;
+    }
+    return output;
+}
 
 pmFPALevel pmFPAviewLevel(const pmFPAview *view)
