Index: trunk/ppImage/src/ppImageDetrendReadout.c
===================================================================
--- trunk/ppImage/src/ppImageDetrendReadout.c	(revision 14000)
+++ trunk/ppImage/src/ppImageDetrendReadout.c	(revision 14223)
@@ -16,5 +16,5 @@
 
     // Masking on the basis of pixel value needs to be done before anything else, so the values are pristine.
-    if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
+    if (options->doMaskBuild) {
         pmReadoutGenerateMask(input, options->satMask, options->badMask);
     }
@@ -51,5 +51,5 @@
 
     // Weight on the basis of pixel value needs to be done after the overscan has been subtracted
-    if (options->doMask || options->doShutter || options->doFlat || options->doPhotom) {
+    if (options->doWeightBuild) {
         // create the target mask and weight images
         pmReadoutGenerateWeight(input, true);
