Index: trunk/psModules/src/camera/pmFPAMaskWeight.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 12696)
+++ trunk/psModules/src/camera/pmFPAMaskWeight.c	(revision 13591)
@@ -93,5 +93,5 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
-bool pmReadoutSetMask(pmReadout *readout)
+bool pmReadoutSetMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -131,8 +131,8 @@
         for (int j = 0; j < image->numCols; j++) {
             if (imageData[i][j] >= saturation) {
-                maskData[i][j] |= PM_MASK_SAT;
+                maskData[i][j] |= satMask;
             }
             if (imageData[i][j] <= bad) {
-                maskData[i][j] |= PM_MASK_BAD;
+                maskData[i][j] |= badMask;
             }
         }
@@ -145,5 +145,5 @@
 // pixels.  currently, it will set mask bits if (value <= BAD) or (value >= SATURATION)
 // should we optionally ignore these tests?
-bool pmReadoutGenerateMask(pmReadout *readout)
+bool pmReadoutGenerateMask(pmReadout *readout, psMaskType satMask, psMaskType badMask)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -188,5 +188,5 @@
     }
 
-    return pmReadoutSetMask(readout);
+    return pmReadoutSetMask(readout, satMask, badMask);
 }
 
@@ -282,5 +282,5 @@
 }
 
-bool pmReadoutGenerateMaskWeight(pmReadout *readout, bool poisson)
+bool pmReadoutGenerateMaskWeight(pmReadout *readout, psMaskType satMask, psMaskType badMask, bool poisson)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -288,5 +288,5 @@
     bool success = true;                // Was everything successful?
 
-    success &= pmReadoutGenerateMask(readout);
+    success &= pmReadoutGenerateMask(readout, satMask, badMask);
     success &= pmReadoutGenerateWeight(readout, poisson);
 
@@ -294,5 +294,5 @@
 }
 
-bool pmCellGenerateMaskWeight(pmCell *cell, bool poisson)
+bool pmCellGenerateMaskWeight(pmCell *cell, psMaskType satMask, psMaskType badMask, bool poisson)
 {
     PS_ASSERT_PTR_NON_NULL(cell, false);
@@ -302,5 +302,5 @@
     for (int i = 0; i < readouts->n; i++) {
         pmReadout *readout = readouts->data[i]; // The readout
-        pmReadoutGenerateMaskWeight(readout, poisson);
+        pmReadoutGenerateMaskWeight(readout, poisson, satMask, badMask);
     }
 
