Index: trunk/ppStack/src/ppStackCamera.c
===================================================================
--- trunk/ppStack/src/ppStackCamera.c	(revision 34800)
+++ trunk/ppStack/src/ppStackCamera.c	(revision 35081)
@@ -47,5 +47,6 @@
     }
     bool convolve = psMetadataLookupBool(NULL, recipe, "CONVOLVE"); // Convolve images before stack?
-
+    bool doBackground = psMetadataLookupBool(NULL, recipe, "BACKGROUND.MODEL");
+    
     psArray *runImages = pmFPAfileDefineMultipleFromRun(&status, NULL, config,
                                                         "PPSTACK.INPUT"); // Input images from previous run
@@ -217,16 +218,25 @@
 
 	    // Grab bkgmodel information here
-	    if (!bkgmodel ||  strlen(bkgmodel) == 0) {
-	      // We have no background models.
+	    if (doBackground) {
+	      if (!bkgmodel ||  strlen(bkgmodel) == 0) {
+		// We have no background models.
+	      }
+	      else {
+		pmFPAfile *inputBKG = defineFile(config,NULL,"PPSTACK.INPUT.BKGMODEL",bkgmodel,
+						 PM_FPA_FILE_IMAGE);
+		if (!inputBKG) {
+		  // We failed to generate an pmFPAfile, so disable the background construction and continue.
+		  doBackground = false;
+		  psMetadataAddBool(recipe, PS_LIST_TAIL, "BACKGROUND.MODEL", PS_META_REPLACE,
+				    "Do photometry on stacked image?", false);
+
+#if (0)
+		  psError(psErrorCodeLast(), false,
+			  "Unable to define file from bkgmodel %d (%s)",i,bkgmodel);
+		  return(false);
+#endif
+		}
+	      }// End bkgmodel
 	    }
-	    else {
-	      pmFPAfile *inputBKG = defineFile(config,NULL,"PPSTACK.INPUT.BKGMODEL",bkgmodel,
-					       PM_FPA_FILE_IMAGE);
-	      if (!inputBKG) {
-		psError(psErrorCodeLast(), false,
-			"Unable to define file from bkgmodel %d (%s)",i,bkgmodel);
-		return(false);
-	      }
-	    }// End bkgmodel
 
 
