Index: branches/eam_branches/ipp-20121219/ppStack/src/ppStackCamera.c
===================================================================
--- branches/eam_branches/ipp-20121219/ppStack/src/ppStackCamera.c	(revision 34902)
+++ branches/eam_branches/ipp-20121219/ppStack/src/ppStackCamera.c	(revision 35096)
@@ -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
 
 
Index: branches/eam_branches/ipp-20121219/ppStack/src/ppStackCombineAlternate.c
===================================================================
--- branches/eam_branches/ipp-20121219/ppStack/src/ppStackCombineAlternate.c	(revision 34902)
+++ branches/eam_branches/ipp-20121219/ppStack/src/ppStackCombineAlternate.c	(revision 35096)
@@ -198,5 +198,5 @@
       offset = (Sy * Sxx - Sx * Sxy) / D;
       scale  = (S * Sxy - Sx * Sy) / D;
-      fprintf(stderr,"Scales: %d %g %g\n",i,offset,scale);
+      fprintf(stderr,"Scales: %d %g %g %g %g %g %g %g %g\n",i,offset,scale,D,Sx,Sy,Sxx,Syy,Sxy);
       // Apply scaling factors
       for (int y = minInputRows; y < maxInputRows; y++) {
