Index: trunk/psModules/src/detrend/pmPattern.c
===================================================================
--- trunk/psModules/src/detrend/pmPattern.c	(revision 27675)
+++ trunk/psModules/src/detrend/pmPattern.c	(revision 27676)
@@ -290,4 +290,5 @@
     psStats *cellStats = psStatsAlloc(cellStat); // Statistics on cells
     if (!psVectorStats(cellStats, mean, NULL, meanMask, PM_PATTERN_ALL)) {
+        // an error in psVectorStats implies a programming error
         psError(PS_ERR_UNKNOWN, false, "Unable to calculate mean cell background.");
         psFree(mean);
@@ -300,8 +301,10 @@
     psFree(cellStats);
     if (!isfinite(background)) {
-        psError(PS_ERR_UNKNOWN, false, "Non-finite mean cell background.");
+        // this can happen if all data in the image is bad -- in this case, do not correct, but
+        // do not treat this as an error (other functions are responsible for check data validity)
+        psLogMsg("psModules.detrend", PS_LOG_DETAIL, "Non-finite mean cell background -- skipping correction (data probabaly bad).");
         psFree(mean);
         psFree(meanMask);
-        return false;
+        return true;
     }
 
