Index: trunk/psphot/src/psphotAddNoise.c
===================================================================
--- trunk/psphot/src/psphotAddNoise.c	(revision 34488)
+++ trunk/psphot/src/psphotAddNoise.c	(revision 34492)
@@ -34,4 +34,5 @@
 static int Nmasked = 0;
 
+// the return state indicates if any sources were actually replaced
 bool psphotAddOrSubNoiseReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe, bool add) {
 
@@ -51,7 +52,6 @@
 
     psArray *sources = detections->allSources;
-    //psAssert (sources, "missing sources?");
-    // if no work, should just return true
-    if (!sources) return true;
+    // if no work to do, should just return true
+    if (!sources) return false;
 
     psTimerStart ("psphot.noise");
@@ -74,5 +74,5 @@
 
     if (SIZE <= 0) {
-       return true;
+       return false;
     }
 
Index: trunk/psphot/src/psphotDeblendSatstars.c
===================================================================
--- trunk/psphot/src/psphotDeblendSatstars.c	(revision 34488)
+++ trunk/psphot/src/psphotDeblendSatstars.c	(revision 34492)
@@ -1048,7 +1048,9 @@
 }
 
+// the return state indicates if any sources were actually subtracted
 bool psphotAddOrSubSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int fileIndex, psMetadata *recipe, bool add) {
 
     bool status;
+    bool modified = false;
 
     psTimerStart ("psphot.deblend.sat");
@@ -1065,9 +1067,10 @@
 
     psArray *sources = detections->allSources;
-    psAssert (sources, "missing sources?");
+    // if no work to do, should just return false
+    if (!sources) return false;
 
     if (!sources->n) {
 	psLogMsg ("psphot", PS_LOG_INFO, "no sources, skipping satstar blend");
-	return true;
+	return false;
     }
 
@@ -1082,9 +1085,12 @@
 	if (!(source->mode2 & PM_SOURCE_MODE2_SATSTAR_PROFILE)) continue;
 
+	// tell the calling function that we modified the image
+	modified = true;
+
 	if (!psphotSatstarProfileOp (source, maskVal, 1.0, 0, add)) continue;
     }
 
     psLogMsg ("psphot", PS_LOG_DETAIL, "satstar op: %f sec\n", psTimerMark ("psphot.deblend.sat"));
-    return true;
+    return modified;
 }
 
Index: trunk/psphot/src/psphotFindDetections.c
===================================================================
--- trunk/psphot/src/psphotFindDetections.c	(revision 34488)
+++ trunk/psphot/src/psphotFindDetections.c	(revision 34492)
@@ -71,4 +71,10 @@
     }
 
+    // first pass vs other: if this is the first pass, the code will use PEAKS_NSIGMA_LIMIT and
+    // only attempt to detect PEAKS_NMAX entries.  If 'firstPass' is false, the code will
+    // attempt to replace the subtracted sources in order to measure the footprints.  After
+    // replacement, it is necessary to regenerate the significance image.  If no sources are
+    // available, the code will skip the significance image regeneration step.
+
     bool replaceSourcesForFootprints = false;
     if (firstPass) {
@@ -126,13 +132,16 @@
     if (useFootprints) {
         if (replaceSourcesForFootprints) {
+	    bool modified = false;
 	    // subtract the noise for all sources including satstars
-            psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false);
-            psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false);
+	    modified |= psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false);
+            modified | psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false);
 
 	    // add in the satstars
-	    psphotAddOrSubSatstarsReadout (config, view, filerule, index, recipe, true);
+	    modified |= psphotAddOrSubSatstarsReadout (config, view, filerule, index, recipe, true);
 
-            psFree (significance);
-            significance = psphotSignificanceImage (readout, recipe, maskVal);
+	    if (modified) {
+		psFree (significance);
+		significance = psphotSignificanceImage (readout, recipe, maskVal);
+	    }
 
 	    // display the significance image
Index: trunk/psphot/src/psphotReplaceUnfit.c
===================================================================
--- trunk/psphot/src/psphotReplaceUnfit.c	(revision 34488)
+++ trunk/psphot/src/psphotReplaceUnfit.c	(revision 34492)
@@ -43,4 +43,5 @@
 }
 
+// the return state indicates if any sources were actually replaced
 bool psphotReplaceAllSourcesReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe, bool ignoreState) {
 
@@ -58,5 +59,5 @@
     if (psMetadataLookupBool (&status, readout->analysis, "PSPHOT.SKIP.INPUT")) {
         psLogMsg ("psphot", PS_LOG_DETAIL, "skipping replace all sources for input file %d", index);
-        return true;
+        return false;
     }
 
@@ -65,6 +66,6 @@
 
     psArray *sources = detections->allSources;
-    //psAssert (sources, "missing sources?");
-    if (!sources) return true;
+    // if no work to do, should just return false
+    if (!sources) return false;
 
     // user-defined masks to test for good/bad pixels (build from recipe list if not yet set)
