Index: /trunk/psModules/src/camera/pmFPAfileDefine.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 14461)
+++ /trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 14462)
@@ -95,8 +95,8 @@
 // Define an output pmFPAfile
 pmFPAfile *pmFPAfileDefineOutputForFormat(const pmConfig *config, // Configuration
-					  pmFPA *fpa, // Optional FPA to bind
-					  const char *name, // Name of file rule
-					  const char *cameraName, // Name of camera configuration to use
-					  const char *formatName // Name of camera format to use
+                                          pmFPA *fpa, // Optional FPA to bind
+                                          const char *name, // Name of file rule
+                                          const char *cameraName, // Name of camera configuration to use
+                                          const char *formatName // Name of camera format to use
     )
 {
@@ -1009,10 +1009,18 @@
     pmFPAfile *file;                    // The new file
     if (config->cameraName[0] == '_' &&
-        strcmp(config->cameraName + strlen(config->cameraName) - 5, "-CHIP") == 0) {
+        (strcmp(config->cameraName + strlen(config->cameraName) - 5, "-CHIP") == 0 ||
+         strcmp(config->cameraName + strlen(config->cameraName) - 8, "-SKYCELL") == 0)) {
         // The input camera has already been mosaicked to this level
         file = pmFPAfileDefineOutputForFormat(config, NULL, filename, config->cameraName, config->formatName);
     } else {
-        psString cameraName = NULL;         // Name of the new (automatically-generated) camera configuration
-        psStringAppend(&cameraName, "_%s-CHIP", config->cameraName);
+        psString cameraName = NULL; // Name of the new (automatically-generated) camera configuration
+        if (config->cameraName[0] == '_' &&
+            strcmp(config->cameraName + strlen(config->cameraName) - 4 , "-FPA") == 0) {
+            cameraName = psStringNCopy(config->cameraName + 1, strlen(config->cameraName) - 5);
+        } else {
+            cameraName = psMemIncrRefCounter(config->cameraName);
+        }
+        psString newCameraName = NULL;  // Name of the new (automatically-generated) camera configuration
+        psStringAppend(&newCameraName, "_%s-CHIP", cameraName);
 
         // Find the correct camera configuration
@@ -1041,14 +1049,18 @@
     pmFPAfile *file;                    // The new file
     if (config->cameraName[0] == '_' &&
-            strcmp(config->cameraName + strlen(config->cameraName) - 4 , "-FPA") == 0) {
+        (strcmp(config->cameraName + strlen(config->cameraName) - 4 , "-FPA") == 0 ||
+         strcmp(config->cameraName + strlen(config->cameraName) - 8, "-SKYCELL") == 0)) {
         // The input camera has already been mosaicked to this level
         file = pmFPAfileDefineOutputForFormat(config, NULL, filename, config->cameraName, config->formatName);
     } else {
 
-        psString original;                  // Name of the original camera configuration
+        psString original = NULL;       // Name of the original camera configuration
         if (config->cameraName[0] == '_' &&
             strcmp(config->cameraName + strlen(config->cameraName) - 5 , "-CHIP") == 0) {
             // It's a chip mosaic; we need to get the original name
             original = psStringNCopy(config->cameraName + 1, strlen(config->cameraName) - 6);
+        } else if (config->cameraName[0] == '_' &&
+            strcmp(config->cameraName + strlen(config->cameraName) - 8, "-SKYCELL") == 0) {
+            original = psStringNCopy(config->cameraName + 1, strlen(config->cameraName) - 9);
         } else {
             original = psMemIncrRefCounter(config->cameraName);
