Index: /trunk/psModules/src/concepts/pmConceptsAverage.c
===================================================================
--- /trunk/psModules/src/concepts/pmConceptsAverage.c	(revision 29602)
+++ /trunk/psModules/src/concepts/pmConceptsAverage.c	(revision 29603)
@@ -222,7 +222,12 @@
 
         float cellSaturation = psMetadataLookupF32(NULL, cell->concepts, "CELL.SATURATION");
-        if (cellSaturation < saturation) {
-            saturation = cellSaturation;
-        }
+	if (cellSaturation > 10000) {
+	    // do not allow invalid values to polute this calculation
+	    // XXX really need to do this on the basis of the fraction of the cell that contributes..
+	    // if a cell is completely masked, it should not be included.
+	    if (cellSaturation < saturation) {
+		saturation = cellSaturation;
+	    }
+	}
         float cellBad = psMetadataLookupF32(NULL, cell->concepts, "CELL.BAD");
         if (cellBad > bad) {
