Index: trunk/psModules/src/config/pmConfigCamera.c
===================================================================
--- trunk/psModules/src/config/pmConfigCamera.c	(revision 18937)
+++ trunk/psModules/src/config/pmConfigCamera.c	(revision 18939)
@@ -23,23 +23,76 @@
 static void removeChipConceptsSources(psMetadata *source);
 
-// Generate the skycell version of a named camera configuration
-bool pmConfigCameraSkycellVersion(psMetadata *system, // The system configuration
-                                  const char *name // Name of the un-mosaicked camera
-                                  )
-{
-    PS_ASSERT_METADATA_NON_NULL(system, false);
-    PS_ASSERT_STRING_NON_EMPTY(name, false);
-
-    bool mdok;                          // Status of MD lookup
-    psMetadata *cameras = psMetadataLookupMetadata(&mdok, system, "CAMERAS"); // List of cameras
-    if (!mdok || !cameras) {
-        psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the system configuration.\n");
-        return false;
-    }
-    if (!pmConfigGenerateSkycellVersion(cameras, cameras, name, system)) {
-        psError(PS_ERR_UNKNOWN, true, "Failed to build skycell camera description for %s\n", name);
-        return false;
-    }
-    return true;
+psString pmConfigCameraRootName(const char *name)
+{
+    PS_ASSERT_STRING_NON_EMPTY(name, NULL);
+
+    if (name[0] != '_') {
+        // It's an original
+        return psStringCopy(name);
+    }
+
+    psString root = psStringCopy(name + 1); // Camera name
+    int length = strlen(name);                     // Length of camera name
+    if (strcmp(root + length - 9, "-SKYCELL") == 0) {
+        length -= 9;
+    } else if (strcmp(root + length - 6, "-CHIP") == 0) {
+        length -= 6;
+    } else if (strcmp(root + length - 5, "-FPA") == 0) {
+        length -= 5;
+    } else {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised derivative camera: %s", name);
+        psFree(root);
+        return NULL;
+    }
+
+    // Truncate the string
+    root[length] = '\0';
+
+    return root;
+}
+
+psString pmConfigCameraSkycellName(const char *name)
+{
+    PS_ASSERT_STRING_NON_EMPTY(name, NULL);
+
+    psString root = pmConfigCameraRootName(name); // Root name of camera
+    if (!root) {
+        return NULL;
+    }
+
+    psStringAppend(&root, "-SKYCELL");
+    psStringPrepend(&root, "_");
+
+    return root;
+}
+
+psString pmConfigCameraChipName(const char *name)
+{
+    PS_ASSERT_STRING_NON_EMPTY(name, NULL);
+
+    psString root = pmConfigCameraRootName(name); // Root name of camera
+    if (!root) {
+        return NULL;
+    }
+
+    psStringAppend(&root, "-CHIP");
+    psStringPrepend(&root, "_");
+
+    return root;
+}
+
+psString pmConfigCameraFPAName(const char *name)
+{
+    PS_ASSERT_STRING_NON_EMPTY(name, NULL);
+
+    psString root = pmConfigCameraRootName(name); // Root name of camera
+    if (!root) {
+        return NULL;
+    }
+
+    psStringAppend(&root, "-FPA");
+    psStringPrepend(&root, "_");
+
+    return root;
 }
 
Index: trunk/psModules/src/config/pmConfigCamera.h
===================================================================
--- trunk/psModules/src/config/pmConfigCamera.h	(revision 18937)
+++ trunk/psModules/src/config/pmConfigCamera.h	(revision 18939)
@@ -5,6 +5,6 @@
  *  @author Eugene Magnier, IfA
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-08-14 00:17:40 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-08-06 03:40:45 $
  *  Copyright 2005-2006 Institute for Astronomy, University of Hawaii
  */
@@ -15,4 +15,22 @@
 /// @addtogroup Config Configuration System
 /// @{
+
+// Return the name of the original ("root") camera
+//
+// The root name is the name of the camera before it was made into a derivative (e.g., skycell, chip, fpa).
+psString pmConfigCameraRootName(const char *name // Name of camera
+    );
+
+// Return the name of the Skycell derivative camera
+psString pmConfigCameraSkycellName(const char *name // Name of camera
+    );
+
+// Return the name of the Chip derivative camera
+psString pmConfigCameraChipName(const char *name // Name of camera
+    );
+
+// Return the name of the FPA derivative camera
+psString pmConfigCameraFPAName(const char *name // Name of camera
+    );
 
 // Generate a skycell version of a camera configuration
Index: trunk/psModules/src/config/pmConfigDump.c
===================================================================
--- trunk/psModules/src/config/pmConfigDump.c	(revision 18937)
+++ trunk/psModules/src/config/pmConfigDump.c	(revision 18939)
@@ -13,4 +13,5 @@
 #include "pmFPAview.h"
 #include "pmFPAfile.h"
+#include "pmConfigCamera.h"
 
 #include "pmConfigDump.h"
@@ -18,20 +19,14 @@
 // Cull entries in the metadata, ignoring the ones listed.
 static bool configCull(psMetadata *md,  // Configuration metadata from which to cull
-                       const char *list // List of items NOT to cull
+                       const psArray *list // List of items NOT to cull
     )
 {
     PS_ASSERT_METADATA_NON_NULL(md, false);
+    PS_ASSERT_ARRAY_NON_NULL(list, false);
 
-    if (!list || strlen(list) == 0) {
-        // Save everything if nothing is listed
-        return true;
+    psHash *keep = psHashAlloc(list->n); // Hash with strings to keep
+    for (int i = 0; i < keep->n; i++) {
+        psHashAdd(keep, list->data[i], list->data[i]);
     }
-
-    psArray *keepList = psStringSplitArray(list, " ,;", false); // List of items to keep
-    psHash *keep = psHashAlloc(keepList->n); // Hash with strings to keep
-    for (int i = 0; i < keep->n; i++) {
-        psHashAdd(keep, keepList->data[i], keepList->data[i]);
-    }
-    psFree(keepList);
 
     psMetadataIterator *iter = psMetadataIteratorAlloc(md, PS_LIST_HEAD, NULL); // Iterator
@@ -57,5 +52,10 @@
     }
 
-    return configCull(config->recipes, save);
+    psArray *keep = psStringSplitArray(save, " ,;", false); // List of items to keep
+
+    bool result = configCull(config->recipes, keep); // Result of culling
+    psFree(keep);
+
+    return result;
 }
 
@@ -70,5 +70,15 @@
       }
 
-      return configCull(cameras, config->cameraName);
+      // Get names of the root camera and its derivatives
+      psArray *keep = psArrayAlloc(4);
+      keep->data[0] = pmConfigCameraRootName(config->cameraName);
+      keep->data[1] = pmConfigCameraChipName(config->cameraName);
+      keep->data[2] = pmConfigCameraFPAName(config->cameraName);
+      keep->data[3] = pmConfigCameraSkycellName(config->cameraName);
+
+      bool result = configCull(cameras, keep); // Result of culling
+      psFree(keep);
+
+      return result;
 }
 
