Index: trunk/psModules/src/camera/pmFPACopy.c
===================================================================
--- trunk/psModules/src/camera/pmFPACopy.c	(revision 10484)
+++ trunk/psModules/src/camera/pmFPACopy.c	(revision 10512)
@@ -333,4 +333,5 @@
     // Update the concepts
     psMetadataCopy(target->concepts, source->concepts);
+    psMetadataCopy(target->parent->concepts, source->parent->concepts);
 
     target->data_exists = true;
Index: trunk/psModules/src/camera/pmFPAMosaic.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMosaic.c	(revision 10484)
+++ trunk/psModules/src/camera/pmFPAMosaic.c	(revision 10512)
@@ -1033,4 +1033,7 @@
     // Currently, there's nothing interesting in the chip concepts that needs to be updated.
 
+    // Copy the concepts for the target FPA
+    target->parent->concepts = psMetadataCopy(target->parent->concepts, source->parent->concepts);
+
     // Now make a new readout to go in the target cell
     pmReadout *newReadout = pmReadoutAlloc(targetCell); // New readout
Index: trunk/psModules/src/camera/pmFPAWrite.c
===================================================================
--- trunk/psModules/src/camera/pmFPAWrite.c	(revision 10484)
+++ trunk/psModules/src/camera/pmFPAWrite.c	(revision 10512)
@@ -29,4 +29,43 @@
 // File-static (private) functions
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+// Update the FPA.NAME, CHIP.NAME and CELL.NAME in the FITS header, if required
+static bool updateNames(pmFPA *fpa, pmChip *chip, pmCell *cell)
+{
+    pmHDU *hdu = pmHDUGetHighest(fpa, chip, cell); // Highest HDU, i.e., the PHU
+    if (!hdu) {
+        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find HDU.\n");
+        return false;
+    }
+    bool mdok;                          // Status of MD lookup
+    psMetadata *fileData = psMetadataLookupMetadata(&mdok, hdu->format, "FILE"); // File information
+    if (!mdok || !fileData) {
+        psError(PS_ERR_UNKNOWN, true, "Unable to find FILE information in camera format.\n");
+        return false;
+    }
+    if (fpa) {
+        const char *fpaNameHdr = psMetadataLookupStr(&mdok, fileData, "FPA.NAME");
+        if (mdok && fpaNameHdr && strlen(fpaNameHdr) > 0) {
+            const char *fpaName = psMetadataLookupStr(NULL, fpa->concepts, "FPA.NAME");
+            psMetadataAddStr(hdu->header, PS_LIST_TAIL, fpaNameHdr, PS_META_REPLACE, "FPA name", fpaName);
+        }
+    }
+    if (chip) {
+        const char *chipNameHdr = psMetadataLookupStr(&mdok, fileData, "CHIP.NAME");
+        if (mdok && chipNameHdr && strlen(chipNameHdr) > 0) {
+            const char *chipName = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
+            psMetadataAddStr(hdu->header, PS_LIST_TAIL, chipNameHdr, PS_META_REPLACE, "Chip name", chipName);
+        }
+    }
+    if (cell) {
+        const char *cellNameHdr = psMetadataLookupStr(&mdok, fileData, "CELL.NAME");
+        if (mdok && cellNameHdr && strlen(cellNameHdr) > 0) {
+            const char *cellName = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
+            psMetadataAddStr(hdu->header, PS_LIST_TAIL, cellNameHdr, PS_META_REPLACE, "Cell name", cellName);
+        }
+    }
+    return true;
+}
 
 // Return the appropriate image array for the given type
@@ -66,5 +105,4 @@
     return false;
 }
-
 // Write a cell image/mask/weight
 static bool cellWrite(pmCell *cell,     // Cell to write
@@ -99,4 +137,5 @@
 
     if (writeBlank || writeImage) {
+        updateNames(cell->parent->parent, cell->parent, cell);
         pmConceptSource source = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS |
                                  PM_CONCEPT_SOURCE_DEFAULTS;
@@ -147,4 +186,5 @@
 
         if (writeBlank || writeImage) {
+            updateNames(chip->parent, chip, NULL);
             pmConceptSource source = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS |
                                      PM_CONCEPT_SOURCE_DEFAULTS;
@@ -176,4 +216,5 @@
 }
 
+
 // Write an FPA image/mask/weight
 static bool fpaWrite(pmFPA *fpa,        // FPA to write
@@ -208,4 +249,5 @@
 
         if (writeBlank || writeImage) {
+            updateNames(fpa, NULL, NULL);
             pmConceptSource source = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS |
                                      PM_CONCEPT_SOURCE_DEFAULTS;
