Index: /trunk/psModules/src/imcombine/pmSubtractionIO.c
===================================================================
--- /trunk/psModules/src/imcombine/pmSubtractionIO.c	(revision 19229)
+++ /trunk/psModules/src/imcombine/pmSubtractionIO.c	(revision 19230)
@@ -1,5 +1,5 @@
 #include <stdio.h>
 #include <pslib.h>
-#include <strings.h>
+#include <string.h>
 
 #include "pmHDU.h"
@@ -33,6 +33,8 @@
 #define NAME_SOL2 "SOLUTION_2"          // Solution for convolving image 2
 
+#define FALLBACK_EXTNAME "SUBTRACTION_KERNEL" // Fallback extension name
 
 // Generate an extension name for the subtraction kernel
+// In the case that there is no chip/cell (the readout is orphaned), the fallback extension name is used
 static psString subtractionKernelExtname(const pmReadout *ro // Readout containing kernel
                                          )
@@ -61,5 +63,5 @@
 
     if (!extname) {
-        extname = psStringCopy("SUBTRACTION_KERNEL");
+        extname = psStringCopy(FALLBACK_EXTNAME);
     }
 
@@ -165,6 +167,6 @@
     // CVS tags, used to identify the version of this file (in case incompatibilities are introduced)
     psString cvsFile = psStringCopy("$RCSfile: pmSubtractionIO.c,v $");
-    psString cvsRev  = psStringCopy("$Revision: 1.2 $");
-    psString cvsDate = psStringCopy("$Date: 2008-08-25 22:14:04 $");
+    psString cvsRev  = psStringCopy("$Revision: 1.3 $");
+    psString cvsDate = psStringCopy("$Date: 2008-08-27 02:54:44 $");
     psStringSubstitute(&cvsFile, NULL, "RCSfile: ");
     psStringSubstitute(&cvsRev,  NULL, "Revision: ");
@@ -276,7 +278,16 @@
     psString extname = subtractionKernelExtname(ro); // Extension name
     if (!psFitsMoveExtName(fits, extname)) {
-        psError(PS_ERR_IO, false, "Unable to move to subtraction kernel table.");
-        psFree(extname);
-        return false;
+        if (strcmp(extname, FALLBACK_EXTNAME) != 0) {
+            psErrorClear();
+            if (!psFitsMoveExtName(fits, FALLBACK_EXTNAME)) {
+                psError(PS_ERR_IO, false, "Unable to move to subtraction kernel table.");
+                psFree(extname);
+                return false;
+            }
+        } else {
+            psError(PS_ERR_IO, false, "Unable to move to subtraction kernel table.");
+            psFree(extname);
+            return false;
+        }
     }
     psFree(extname);
