Index: trunk/psphot/src/psphot.h
===================================================================
--- trunk/psphot/src/psphot.h	(revision 13570)
+++ trunk/psphot/src/psphot.h	(revision 13593)
@@ -57,5 +57,5 @@
 int             pmSourceSortByY (const void **a, const void **b);
 bool            psphotGrowthCurve (pmReadout *readout, pmPSF *psf, bool ignore);
-bool            psphotMaskReadout (pmReadout *readout, psMetadata *recipe);
+bool            psphotMaskReadout (pmReadout *readout, psMetadata *recipe, pmConfig *config);
 void            psphotSourceFreePixels (psArray *sources);
 
Index: trunk/psphot/src/psphotMaskReadout.c
===================================================================
--- trunk/psphot/src/psphotMaskReadout.c	(revision 13570)
+++ trunk/psphot/src/psphotMaskReadout.c	(revision 13593)
@@ -1,6 +1,6 @@
 # include "psphotInternal.h"
 
-bool psphotMaskReadout (pmReadout *readout, psMetadata *recipe) {
-    
+bool psphotMaskReadout (pmReadout *readout, psMetadata *recipe, pmConfig *config) {
+
     bool status;
 
@@ -19,5 +19,5 @@
 
     // psImageKeepRegion assumes the region refers to the parent coordinates
-    psImageKeepRegion (readout->mask, keep, "OR", PM_MASK_BAD);
+    psImageKeepRegion (readout->mask, keep, "OR", pmConfigMask("BAD", config));
 
     return true;
Index: trunk/psphot/src/psphotReadout.c
===================================================================
--- trunk/psphot/src/psphotReadout.c	(revision 13570)
+++ trunk/psphot/src/psphotReadout.c	(revision 13593)
@@ -24,5 +24,6 @@
 
     // generate mask & weight images if they don't already exit
-    if ((!readout->mask && !pmReadoutGenerateMask(readout)) ||
+    if ((!readout->mask && !pmReadoutGenerateMask(readout, pmConfigMask("SAT", config),
+                                                  pmConfigMask("BAD", config))) ||
         (!readout->weight && !pmReadoutGenerateWeight(readout, true))) {
         psError (PSPHOT_ERR_CONFIG, false, "trouble creating mask and/or weight");
@@ -37,5 +38,5 @@
 
     // I have a valid mask, now mask in the analysis region of interest
-    psphotMaskReadout (readout, recipe);
+    psphotMaskReadout (readout, recipe, config);
 
     // run a single-model test if desired
