Index: /branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c
===================================================================
--- /branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c	(revision 6840)
+++ /branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c	(revision 6841)
@@ -90,10 +90,10 @@
 // Get the name of a PHU chip or cell from the header
 static psString phuNameFromHeader(const char *name, // The name to lookup: "CELL.NAME" or "CHIP.NAME"
-                                  const psMetadata *format, // FILE within the camera format description
+                                  const psMetadata *fileInfo, // FILE within the camera format description
                                   const psMetadata *header // Primary header
                                  )
 {
     bool mdok = true;                   // Result of MD lookup
-    psString keyword = psMetadataLookupStr(&mdok, format, name);
+    psString keyword = psMetadataLookupStr(&mdok, fileInfo, name);
     if (!mdok || strlen(keyword) == 0) {
         return false;
@@ -181,5 +181,5 @@
 
 // Looks up the particular content based on the header
-static const char *getContent(psMetadata *format, // The FORMAT from the camera format configuration
+static const char *getContent(psMetadata *fileInfo, // The FILE from the camera format configuration
                               psMetadata *contents, // The CONTENTS from the camera format configuration
                               psMetadata *header // The (primary) header
@@ -187,7 +187,7 @@
 {
     bool mdok = true;                   // Status of MD lookup
-    const char *contentHeaders = psMetadataLookupStr(&mdok, format, "CONTENT"); // Headers for content
+    const char *contentHeaders = psMetadataLookupStr(&mdok, fileInfo, "CONTENT"); // Headers for content
     if (!mdok || !contentHeaders || strlen(contentHeaders) == 0) {
-        psError(PS_ERR_IO, true, "Unable to find CONTENT in FORMAT.\n");
+        psError(PS_ERR_IO, true, "Unable to find CONTENT in FILE within camera format configuration.\n");
         return NULL;
     }
@@ -496,6 +496,6 @@
 
     bool mdok = true;                   // Status from metadata lookups
-    psMetadata *formatSpec = psMetadataLookupMD(&mdok, format, "FILE"); // The format specification
-    if (!mdok || !formatSpec) {
+    psMetadata *fileInfo = psMetadataLookupMD(&mdok, format, "FILE"); // The file information
+    if (!mdok || !fileInfo) {
         psError(PS_ERR_IO, false, "Unable to find FILE in the camera format configuration.\n");
         return NULL;
@@ -503,5 +503,5 @@
 
     // Check the name of the FPA
-    psString newFPAname = phuNameFromHeader("FPA.NAME", formatSpec, phu); // New name for the FPA
+    psString newFPAname = phuNameFromHeader("FPA.NAME", fileInfo, phu); // New name for the FPA
     const char *currentFPAname = psMetadataLookupStr(&mdok, fpa->concepts, "FPA.NAME"); // Current name
     if (mdok && currentFPAname && strlen(currentFPAname) > 0 && strcmp(currentFPAname, newFPAname) != 0) {
@@ -513,5 +513,5 @@
 
     // Where does the PHU go?
-    const char *phuType = psMetadataLookupStr(&mdok, formatSpec, "PHU"); // What is the PHU?
+    const char *phuType = psMetadataLookupStr(&mdok, fileInfo, "PHU"); // What is the PHU?
     if (!mdok || strlen(phuType) == 0) {
         psError(PS_ERR_IO, false, "Unable to find PHU in the format specification.\n");
@@ -528,5 +528,5 @@
 
     // And what are the individual extensions?
-    const char *extType = psMetadataLookupStr(&mdok, formatSpec, "EXTENSIONS"); // What's in the extns?
+    const char *extType = psMetadataLookupStr(&mdok, fileInfo, "EXTENSIONS"); // What's in the extns?
     if (!mdok || strlen(extType) == 0) {
         psError(PS_ERR_IO, false, "Unable to find EXTENSIONS in the format specification.\n");
@@ -565,8 +565,8 @@
     if (strcasecmp(extType, "NONE") == 0) {
         // We have already dealt with the case PHU=FPA, in a special case, above.
-        const char *content = getContent(formatSpec, contents, phu); // The content: string of chip:cell pairs
+        const char *content = getContent(fileInfo, contents, phu); // The content: string of chip:cell pairs
 
         // Need to look up what chip we have.
-        psString chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu);
+        psString chipName = phuNameFromHeader("CHIP.NAME", fileInfo, phu);
         psTrace(__func__, 5, "This is chip %s\n", chipName);
         int chipNum = pmFPAFindChip(fpa, chipName); // Chip number
@@ -587,5 +587,5 @@
             level = PM_FPA_LEVEL_CELL;
             // Need to look up what cell we have.
-            psString cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu);
+            psString cellName = phuNameFromHeader("CELL.NAME", fileInfo, phu);
             int cellNum = pmChipFindCell(chip, cellName); // Cell number
             if (cellNum == -1) {
@@ -619,5 +619,5 @@
     } else {
         // Get the chip
-        psString chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu); // Name of the chip
+        psString chipName = phuNameFromHeader("CHIP.NAME", fileInfo, phu); // Name of the chip
         int chipNum = pmFPAFindChip(fpa, chipName); // Chip number
         if (chipNum == -1) {
@@ -632,5 +632,5 @@
             addHDUtoChip(chip, phdu);
         } else if (strcasecmp(phuType, "CELL") == 0) {
-            psString cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu); // Name of the cell
+            psString cellName = phuNameFromHeader("CELL.NAME", fileInfo, phu); // Name of the cell
             int cellNum = pmChipFindCell(chip, cellName); // Cell number
             if (cellNum == -1) {
