Index: trunk/ippScripts/scripts/detrend_norm_apply.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 15853)
+++ trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 15918)
@@ -64,4 +64,9 @@
 my $RECIPE_PPSTATS = 'CHIPSTATS'; # Recipe to use with ppStats
 
+my $isMaskType = 0;
+if (lc($det_type) eq "mask") { $isMaskType = 1; }
+if (lc($det_type) eq "darkmask") { $isMaskType = 1; }
+if (lc($det_type) eq "flatmask") { $isMaskType = 1; }
+
 # values to extract from output metadata and the stats to calculate
 my $STATS = 
@@ -103,4 +108,5 @@
     $command .= " -recipe PPIMAGE $RECIPE_PPIMAGE";
     $command .= " -recipe PPSTATS $RECIPE_PPSTATS";
+    $command .= " -F PPIMAGE.OUTPUT PPIMAGE.OUTPUT.DETMASK" if ($isMaskType); # XXXX something of a hack (too many places to control things...)
     $command .= ' -isfringe' if lc($det_type) eq 'fringe';
     $command .= " -tracedest $traceDest -log $logDest";
