Index: /trunk/ippconfig/recipes/psphot.config
===================================================================
--- /trunk/ippconfig/recipes/psphot.config	(revision 33888)
+++ /trunk/ippconfig/recipes/psphot.config	(revision 33889)
@@ -68,4 +68,5 @@
 FOOTPRINT_CULL_NSIGMA_MIN           F32   1       	  # Minimum height of colls in units of skyStdev
 FOOTPRINT_CULL_NSIGMA_PAD           F32   0.01       	  # Fractional Padding for stdev
+FOOTPRINT_USE_UNSUBTRACTED          BOOL  TRUE            # find footprints without sources subtracted
 
 # parameter for the simple deblending
@@ -191,5 +192,5 @@
 KRON_APPLY_WEIGHT                   BOOL  TRUE
 KRON_APPLY_WINDOW                   BOOL  TRUE
-KRON_SMOOTH                         BOOL  FALSE
+KRON_SMOOTH                         BOOL  TRUE
 
 # Extended source fit parameters
Index: /trunk/psphot/src/psphotFindDetections.c
===================================================================
--- /trunk/psphot/src/psphotFindDetections.c	(revision 33888)
+++ /trunk/psphot/src/psphotFindDetections.c	(revision 33889)
@@ -48,4 +48,5 @@
     // Use the new pmFootprints approach?
     const bool useFootprints = psMetadataLookupBool(NULL, recipe, "USE_FOOTPRINTS");
+    const bool footprintsUseUnsubtracted = psMetadataLookupBool(NULL, recipe, "FOOTPRINT_USE_UNSUBTRACTED");
 
     pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
@@ -64,4 +65,5 @@
     }
 
+    bool replaceSourcesForFootprints = false;
     if (firstPass) {
         pass = 1;
@@ -70,4 +72,6 @@
     } else {
         pass = 2;
+        // XXX change this to a recipe value
+        replaceSourcesForFootprints = footprintsUseUnsubtracted;    
         NSIGMA_PEAK = psMetadataLookupF32 (&status, recipe, "PEAKS_NSIGMA_LIMIT_2"); PS_ASSERT (status, NULL);
         NMAX = 0; // unlimited number of peaks in final pass: allow a limit (PEAKS_NMAX_2) ?
@@ -116,5 +120,16 @@
     // optionally merge peaks into footprints
     if (useFootprints) {
+        if (replaceSourcesForFootprints) {
+            psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false);
+            psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false);
+            psFree (significance);
+            significance = psphotSignificanceImage (readout, recipe, maskVal);
+        }
+
 	psphotFindFootprints (detections, significance, readout, recipe, threshold, pass, maskVal);
+
+        if (replaceSourcesForFootprints) {
+            psphotRemoveAllSourcesReadout (config, view, filerule, index, recipe, false);
+        }
     }
 
