Index: /trunk/psModules/src/camera/pmFPAfileDefine.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 8878)
+++ /trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 8879)
@@ -531,6 +531,4 @@
 pmFPAfile *pmFPAfileDefineFromConf (bool *found, pmConfig *config, char *filename)
 {
-    bool status;
-
     PS_ASSERT_PTR_NON_NULL(config, false);
     PS_ASSERT_PTR_NON_NULL(filename, false);
@@ -563,4 +561,5 @@
     }
 
+
     // image names may not come from file->names
     if (!strcasecmp (file->filerule, "@FILES")) {
@@ -581,76 +580,8 @@
     }
 
-    // use the supplied filename
-    char *infile = psStringCopy (file->filerule);
-
-    // load the header of the first image
-    psFits *fits = psFitsOpen (infile, "r");
-    psMetadata *phu = psFitsReadHeader (NULL, fits);
-    psFitsClose (fits);
-
-    // determine the current format from the header
-    // determine camera if not specified already
-    file->format = pmConfigCameraFormatFromHeader (config, phu);
-    if (!file->format) {
-        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", infile);
-        psFree(phu);
-        psFree(fpa);
-        psFree(file);
-        psFree(infile);
-        return NULL;
-    }
-
-    // set the view to the corresponding entry for this phu
-    pmFPAview *view = pmFPAAddSourceFromHeader (fpa, phu, file->format);
-    if (!view) {
-        psError(PS_ERR_IO, false, "Unable to determine source for %s (%s)", file->name, infile);
-        psFree(phu);
-        psFree(fpa);
-        psFree(file);
-        psFree(infile);
-        return NULL;
-    }
-
-    // adjust the rules to identify these files in the file->names data
-    psFree (file->filerule);
-    psFree (file->filextra);
-    file->filerule = psStringCopy ("@FILES");
-    file->filextra = psStringCopy ("{CHIP.NAME}.{CELL.NAME}");
-
-    // find the matching fileLevel
-    psMetadata *filemenu = psMetadataLookupPtr (&status, file->format, "FILE");
-    if (!filemenu) {
-        psError (PS_ERR_IO, true, "missing FILE in FORMAT");
-        psFree(phu);
-        psFree(fpa);
-        psFree(file);
-        psFree(view);
-        psFree(infile);
-        return NULL;
-    }
-    char *levelName = psMetadataLookupStr (&status, filemenu, "PHU");
-    if (!levelName) {
-        psError (PS_ERR_IO, true, "missing PHU in FILE in FORMAT");
-        return NULL;
-    }
-    file->fileLevel = pmFPALevelFromName (levelName);
-    if (file->fileLevel == PM_FPA_LEVEL_NONE) {
-        psError (PS_ERR_IO, true, "unknown level");
-        return NULL;
-    }
-
-    // associate the filename with the FPA element
-    char *name = pmFPAfileNameFromRule (file->filextra, file, view);
-
-    // save the name association in the pmFPAfile structure
-    psMetadataAddStr (file->names, PS_LIST_TAIL, name, 0, "", infile);
-
-    psFree (phu);
+    if (found) {
+        *found = true;
+    }
     psFree (fpa);
-    psFree (view);
-    psFree (name);
-    psFree (infile);
-
-    *found = true;
     return file;
 }
Index: /trunk/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAfileIO.c	(revision 8878)
+++ /trunk/psModules/src/camera/pmFPAfileIO.c	(revision 8879)
@@ -247,4 +247,13 @@
     }
 
+    // We need to read it --- double-check it's open!
+    if (file->state == PM_FPA_STATE_CLOSED) {
+        file->fileLevel = level;
+        if (!pmFPAfileOpen (file, view, config)) {
+            psError(PS_ERR_IO, false, "failed to open file %s when attempting to read", file->name);
+            return false;
+        }
+    }
+
     switch (file->type) {
     case PM_FPA_FILE_IMAGE:
