Index: /branches/eam_branch_20071212/ppMerge/src/ppMerge.c
===================================================================
--- /branches/eam_branch_20071212/ppMerge/src/ppMerge.c	(revision 15805)
+++ /branches/eam_branch_20071212/ppMerge/src/ppMerge.c	(revision 15806)
@@ -55,6 +55,15 @@
 
     if (options->mask) {
-        // Generate a mask
-        ppMergeMask(data, options, config);
+        // Generate a mask 
+	// XXX this should result in a mask image based on the outliers relative to the ensemble in a given image
+        ppMergeMaskByImageStats(data, options, config);
+
+        // Do the combination and write
+	// XXX this should result in a mask image based on the outlier statistics relative to the per-pixel histogram 
+        ppMergeMaskByPixelStats(data, options, config);
+
+        ppMergeMaskUnion(data, options, config);
+
+        ppMergeMaskOutput(data, options, config);
     } else {
 
Index: /branches/eam_branch_20071212/ppMerge/src/ppMergeCombine.c
===================================================================
--- /branches/eam_branch_20071212/ppMerge/src/ppMergeCombine.c	(revision 15805)
+++ /branches/eam_branch_20071212/ppMerge/src/ppMergeCombine.c	(revision 15806)
@@ -352,4 +352,6 @@
         }
 
+	// XXX Why don't we perfrom pmComceptsAverageChips here?
+
         // Write the pixels
         if (chip->hdu && !chip->hdu->blankPHU) {
