Index: trunk/psModules/src/camera/pmFPAfile.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfile.c	(revision 23740)
+++ trunk/psModules/src/camera/pmFPAfile.c	(revision 23746)
@@ -205,11 +205,14 @@
     }
     if (strstr(newName, "{CHIP.NAME}")) {
+        const char *name = NULL;        // Name of chip
         pmChip *chip = pmFPAviewThisChip(view, fpa);
         if (chip) {
-            char *name = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
-            if (name) {
-                psStringSubstitute(&newName, name, "{CHIP.NAME}");
-            }
-        }
+            name = psMetadataLookupStr(NULL, chip->concepts, "CHIP.NAME");
+            psAssert(name, "All chips should have a name");
+        } else {
+            name = "fpa";
+        }
+        psStringSubstitute(&newName, name, "{CHIP.NAME}");
+
     }
     if (strstr(newName, "{CHIP.ID}")) {
@@ -255,11 +258,13 @@
     }
     if (strstr(newName, "{CELL.NAME}")) {
+        const char *name = NULL;        // Name of cell
         pmCell *cell = pmFPAviewThisCell(view, fpa);
         if (cell) {
-            char *name = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
-            if (name) {
-                psStringSubstitute(&newName, name, "{CELL.NAME}");
-            }
-        }
+            name = psMetadataLookupStr(NULL, cell->concepts, "CELL.NAME");
+            psAssert(name, "All cells should have a name");
+        } else {
+            name = "chip";
+        }
+        psStringSubstitute(&newName, name, "{CELL.NAME}");
     }
     if (strstr(newName, "{CELL.N}")) {
Index: trunk/psModules/src/concepts/pmConcepts.c
===================================================================
--- trunk/psModules/src/concepts/pmConcepts.c	(revision 23740)
+++ trunk/psModules/src/concepts/pmConcepts.c	(revision 23746)
@@ -421,24 +421,28 @@
 
 // Interpolate the concept.  Generalises the FPA/Chip/Cell
-#define CONCEPT_INTERPOLATE(SOURCE, NAME) \
+#define CONCEPT_INTERPOLATE(SOURCE, NAME, DEFAULT) \
     if (strncmp(concept, NAME, strlen(NAME)) == 0) { \
-        if (!(SOURCE)) { \
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot interpolate %s because %s not provided", \
-                    concept, NAME); \
-            psFree(string); \
-            return NULL; \
-        } \
-        psMetadataItem *item = psMetadataLookup((SOURCE)->concepts, concept); /* Item with concept */ \
-        if (!item) { \
-            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Can't find concept %s in %s", concept, NAME); \
-            psFree(string); \
-            return NULL; \
-        } \
-        \
-        psString value = psMetadataItemParseString(item); /* Value of concept */ \
-        if (!value) { \
-            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s", concept); \
-            psFree(string); \
-            return NULL; \
+        psString value = NULL; /* Value of concept */ \
+        if (SOURCE) { \
+            psMetadataItem *item = psMetadataLookup((SOURCE)->concepts, concept); /* Item with concept */ \
+            if (!item) { \
+                psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Can't find concept %s in %s", concept, NAME); \
+                psFree(string); \
+                return NULL; \
+            } \
+            \
+            psString value = psMetadataItemParseString(item); /* Value of concept */ \
+            if (!value) { \
+                psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to parse concept %s", concept); \
+                psFree(string); \
+                return NULL; \
+            } \
+        } else { \
+            if (!(DEFAULT)) { \
+                psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to determine concept %s", concept); \
+                psFree(string); \
+                return NULL; \
+            } \
+            value = psStringCopy(DEFAULT); \
         } \
         \
@@ -483,7 +487,7 @@
         psTrace("psModules.concepts", 7, "Interpolating concept %s", concept);
 
-        CONCEPT_INTERPOLATE(fpa,  "FPA");
-        CONCEPT_INTERPOLATE(chip, "CHIP");
-        CONCEPT_INTERPOLATE(cell, "CELL");
+        CONCEPT_INTERPOLATE(fpa,  "FPA", NULL);
+        CONCEPT_INTERPOLATE(chip, "CHIP", "fpa");
+        CONCEPT_INTERPOLATE(cell, "CELL", "chip");
 
         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised concept: %s", concept);
