Index: /branches/eam_branch_20081024/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- /branches/eam_branch_20081024/psModules/src/camera/pmFPAfileIO.c	(revision 20351)
+++ /branches/eam_branch_20081024/psModules/src/camera/pmFPAfileIO.c	(revision 20352)
@@ -781,5 +781,7 @@
           // determine camera if not specified already
           // XXX can I actually reach this with camera not specified??
-          file->format = pmConfigCameraFormatFromHeader (NULL, NULL, config, phu, true);
+	  psMetadata *camera = NULL;
+	  psString formatName = NULL;
+          file->format = pmConfigCameraFormatFromHeader (&camera, &formatName, config, phu, true);
           if (!file->format) {
             psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", file->filename);
@@ -788,4 +790,18 @@
           }
           psFree(phu);
+
+	  pmFPA *newFPA = pmFPAConstruct (camera, formatName);
+	  if (!newFPA) {
+	      psError(PS_ERR_IO, false, "Failed to construct FPA from %s for %s", file->filename, formatName);
+	      psFree(camera);
+	      psFree(formatName);
+	      return NULL;
+	  }
+	  psFree(camera);
+	  psFree(formatName);
+
+	  // XXX this is really dangerous...
+	  psFree (file->fpa);
+	  file->fpa = newFPA;
         }
 
