Index: /branches/eam_branches/20091201/psphot/src/psphotEfficiency.c
===================================================================
--- /branches/eam_branches/20091201/psphot/src/psphotEfficiency.c	(revision 26877)
+++ /branches/eam_branches/20091201/psphot/src/psphotEfficiency.c	(revision 26878)
@@ -128,4 +128,6 @@
     psFree(rng);
 
+    bool oldThreads = pmReadoutFakeThreads(true); // Old threading status
+
     pmReadout *fakeRO = pmReadoutAlloc(NULL); // Fake readout
     if (!pmReadoutFakeFromVectors(fakeRO, numCols, numRows, xAll, yAll, magAll,
@@ -141,4 +143,6 @@
     psFree(xAll);
     psFree(yAll);
+
+    pmReadoutFakeThreads(oldThreads);
 
     psBinaryOp(ro->image, ro->image, "+", fakeRO->image);
Index: /branches/eam_branches/20091201/psphot/src/psphotModelBackground.c
===================================================================
--- /branches/eam_branches/20091201/psphot/src/psphotModelBackground.c	(revision 26877)
+++ /branches/eam_branches/20091201/psphot/src/psphotModelBackground.c	(revision 26878)
@@ -152,4 +152,7 @@
     // XXXX we can thread this here by running blocks in parallel
 
+    int nFailures = 0;
+    psImageBackgroundInit();
+
     // measure clipped median for subimages
     psRegion ruffRegion = {0,0,0,0};
@@ -218,7 +221,10 @@
                 stats->options = PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV;
                 if (!psImageBackground(stats, &sample, subset, submask, maskVal, rng)) {
-                    // psLogMsg ("psphot", PS_LOG_WARN, "Failed to estimate background using ROBUST_MEDIAN for "
-                    //            "(%dx%d, (row0,col0) = (%d,%d)",
-                    //            subset->numRows, subset->numCols, subset->row0, subset->col0);
+		    if ((nFailures < 3) || (nFailures % 100 == 0)) {
+			psLogMsg ("psphot", PS_LOG_WARN, "Failed to estimate background using ROBUST_MEDIAN for "
+				  "(%dx%d, (row0,col0) = (%d,%d)",
+				  subset->numRows, subset->numCols, subset->row0, subset->col0);
+		    }
+		    nFailures ++;
                     modelData[iy][ix] = modelStdevData[iy][ix] = NAN;
                 } else {
@@ -239,4 +245,8 @@
             psFree (submask);
         }
+    }
+
+    if (nFailures) {
+	psLogMsg ("psphot", PS_LOG_WARN, "Failed to estimate background for %d of %d subimages", nFailures, (model->numRows*model->numCols));
     }
 
Index: /branches/eam_branches/20091201/psphot/src/psphotSourceSize.c
===================================================================
--- /branches/eam_branches/20091201/psphot/src/psphotSourceSize.c	(revision 26877)
+++ /branches/eam_branches/20091201/psphot/src/psphotSourceSize.c	(revision 26878)
@@ -194,4 +194,6 @@
     options->ApResid = stats->robustMedian;
     options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0.05);
+    // XXX this is quite arbitrary...
+    if (!isfinite(options->ApSysErr)) options->ApSysErr = 0.01;
     psLogMsg ("psphot", PS_LOG_DETAIL, "psf - Sum: %f +/- %f\n", options->ApResid, options->ApSysErr);
 
