Index: trunk/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfileIO.c	(revision 17832)
+++ trunk/psModules/src/camera/pmFPAfileIO.c	(revision 17911)
@@ -263,13 +263,14 @@
             }
 
-            pmFPA *nameSource = file->src; // Source of FPA.NAME
+            pmFPA *nameSource = file->src; // Source of FPA.OBS
             if (!nameSource) {
                 nameSource = file->fpa;
             }
             bool mdok;                  // Status of MD lookup
-            const char *fpaname = psMetadataLookupStr(&mdok, nameSource->concepts, "FPA.NAME"); // Name of FPA
-
-            pmFPAAddSourceFromView(file->fpa, fpaname, view, format);
-            psTrace ("psModules.camera", 5, "created fpa data elements for %s (%s) (%d:%d:%d)\n", file->name, file->name, view->chip, view->cell, view->readout);
+            const char *fpaObs = psMetadataLookupStr(&mdok, nameSource->concepts, "FPA.OBS"); // Obs. id
+
+            pmFPAAddSourceFromView(file->fpa, fpaObs, view, format);
+            psTrace ("psModules.camera", 5, "created fpa data elements for %s (%s) (%d:%d:%d)\n",
+                     file->name, file->name, view->chip, view->cell, view->readout);
             break;
     }
@@ -349,5 +350,5 @@
     // (existing) fpa
     if (file->type == PM_FPA_FILE_CMF) {
-	if (!pmFPAviewCheckDataStatusForSources (view, file)) {
+        if (!pmFPAviewCheckDataStatusForSources (view, file)) {
         psTrace("psModules.camera", 6, "skip write for %s, no data for this entry", file->name);
         return true;
@@ -778,36 +779,36 @@
         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
-	  file->format = pmConfigCameraFormatFromHeader (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
+          file->format = pmConfigCameraFormatFromHeader (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
