Index: /trunk/psModules/src/camera/pmFPAWrite.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAWrite.c	(revision 18176)
+++ /trunk/psModules/src/camera/pmFPAWrite.c	(revision 18177)
@@ -161,5 +161,5 @@
         pmConceptSource source = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS |
                                  PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE;
-        if (!pmConceptsWriteCell(cell, source, true, NULL)) {
+        if (!pmConceptsWriteCell(cell, source, true, config)) {
             psError(PS_ERR_IO, false, "Unable to write concepts for cell.\n");
             return false;
@@ -211,5 +211,5 @@
             pmConceptSource source = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS |
                                      PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE;
-            if (!pmConceptsWriteChip(chip, source, true, true, NULL)) {
+            if (!pmConceptsWriteChip(chip, source, true, true, config)) {
                 psError(PS_ERR_IO, false, "Unable to write concepts for chip.\n");
                 return false;
@@ -275,5 +275,5 @@
             pmConceptSource source = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS |
                                      PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE;
-            if (!pmConceptsWriteFPA(fpa, source, true, NULL)) {
+            if (!pmConceptsWriteFPA(fpa, source, true, config)) {
                 psError(PS_ERR_IO, false, "Unable to write concepts for FPA.\n");
                 return false;
Index: /trunk/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAfileIO.c	(revision 18176)
+++ /trunk/psModules/src/camera/pmFPAfileIO.c	(revision 18177)
@@ -438,14 +438,14 @@
             PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE; // Concept sources to write
         if (cell) {
-            if (!pmConceptsWriteCell(cell, sources, true, NULL)) {
+            if (!pmConceptsWriteCell(cell, sources, true, config)) {
                 psError(PS_ERR_IO, false, "Unable to write concepts for cell.\n");
                 return false;
             }
         } else if (chip) {
-            if (!pmConceptsWriteChip(chip, sources, true, true, NULL)) {
+            if (!pmConceptsWriteChip(chip, sources, true, true, config)) {
                 psError(PS_ERR_IO, false, "Unable to write concepts for chip.\n");
                 return false;
             }
-        } else if (!pmConceptsWriteFPA(fpa, sources, true, NULL)) {
+        } else if (!pmConceptsWriteFPA(fpa, sources, true, config)) {
             psError(PS_ERR_IO, false, "Unable to write concepts for FPA.\n");
             return false;
@@ -779,37 +779,37 @@
         file->fits->options = psMemIncrRefCounter(file->options);
 
-	// in most cases, we have already open and read the phu and determined the format.
-	// in some cases, (eg DetDB images), we have only just determined the filename.
-	// we need to check the file format before we can work with the file
-	if (!file->format) {
-	  psMetadata *phu = psFitsReadHeader (NULL, file->fits);
-	  if (!phu) {
-	    psError(PS_ERR_IO, false, "Failed to read file header %s\n", file->filename);
-	    return false;
-	  }
-
-	  // determine the current format from the header
-	  // determine camera if not specified already
-	  // XXX can I actually reach this with camera not specified??
-	  file->format = pmConfigCameraFormatFromHeader (NULL, NULL, config, phu, true);
-	  if (!file->format) {
-	    psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", file->filename);
-	    psFree(phu);
-	    return false;
-	  }
-	  psFree(phu);
-	}
-
-	// if needed, set the optional EXTWORD field based on the camera value
-	psMetadata *fileMenu = psMetadataLookupMetadata (NULL, file->format, "FILE");
-	if (!fileMenu) {
-	  psError (PS_ERR_IO, true, "FILE METADATA missing from camera format %s\n",
-		   config->formatName);
-	  return false;
-	}
-	char *extword = psMetadataLookupStr (&status, fileMenu, "EXTWORD");
-	if (status) {
-	  psFitsSetExtnameWord (file->fits, extword);
-	}
+        // in most cases, we have already open and read the phu and determined the format.
+        // in some cases, (eg DetDB images), we have only just determined the filename.
+        // we need to check the file format before we can work with the file
+        if (!file->format) {
+          psMetadata *phu = psFitsReadHeader (NULL, file->fits);
+          if (!phu) {
+            psError(PS_ERR_IO, false, "Failed to read file header %s\n", file->filename);
+            return false;
+          }
+
+          // determine the current format from the header
+          // determine camera if not specified already
+          // XXX can I actually reach this with camera not specified??
+          file->format = pmConfigCameraFormatFromHeader (NULL, NULL, config, phu, true);
+          if (!file->format) {
+            psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", file->filename);
+            psFree(phu);
+            return false;
+          }
+          psFree(phu);
+        }
+
+        // if needed, set the optional EXTWORD field based on the camera value
+        psMetadata *fileMenu = psMetadataLookupMetadata (NULL, file->format, "FILE");
+        if (!fileMenu) {
+          psError (PS_ERR_IO, true, "FILE METADATA missing from camera format %s\n",
+                   config->formatName);
+          return false;
+        }
+        char *extword = psMetadataLookupStr (&status, fileMenu, "EXTWORD");
+        if (status) {
+          psFitsSetExtnameWord (file->fits, extword);
+        }
 
         // XXX these are probably only needed for WRITE files
@@ -888,5 +888,5 @@
     psMetadata *phu = psFitsReadHeader (NULL, file->fits);
     if (!file->format) {
-	// determine the format (camera is already known); do not load the recipe
+        // determine the format (camera is already known); do not load the recipe
         file->format = pmConfigCameraFormatFromHeader (NULL, &file->formatName, config, phu, false);
         if (!file->format) {
