Index: /trunk/psphot/src/psphotImageMedian.c
===================================================================
--- /trunk/psphot/src/psphotImageMedian.c	(revision 12450)
+++ /trunk/psphot/src/psphotImageMedian.c	(revision 12451)
@@ -63,10 +63,12 @@
     }
 
-    psMetadataConfigPrint (stderr, recipe);
-
     // optionally set the sigma clipping
     stats->clipSigma = psMetadataLookupF32 (&status, recipe, "SKY_CLIP_SIGMA");
     if (!status) {
-        stats->clipSigma = 1.0;
+        if ((stats->options & PS_STAT_FITTED_MEAN) || (stats->options & PS_STAT_FITTED_MEAN_V2)) {
+	    stats->clipSigma = 1.0;
+	} else {
+	    stats->clipSigma = 3.0;
+	}
     }
 
@@ -166,5 +168,4 @@
 		continue;
 	    }
-
             psImage *submask = psImageSubset (mask, region);
 
@@ -177,5 +178,6 @@
 	    // XXX psImageBackground will probably be renamed psImageStats
 	    // XXX don't bother trying if there are no valid pixels...
-            if (psImageBackground(stats, subset, submask, 0xff, rng)) {
+
+	    if (psImageBackground(stats, subset, submask, 0xff, rng)) {
 		if (stats->options & PS_STAT_ROBUST_QUARTILE) {
 		    modelData[iy][ix] = stats->robustMedian;
