Index: trunk/ppStack/src/ppStackReadout.c
===================================================================
--- trunk/ppStack/src/ppStackReadout.c	(revision 19208)
+++ trunk/ppStack/src/ppStackReadout.c	(revision 19267)
@@ -10,7 +10,5 @@
 #include "ppStack.h"
 
-//#define REJECTION_FILES                 // Write rejection mask?
-//#define INSPECTION_FILES                // Write inspection mask?
-//#define COMBINED_FILES                  // Write combined images?
+//#define TESTING                  // Write debugging output?
 
 
@@ -78,5 +76,5 @@
     }
 
-#ifdef COMBINED_FILES
+#ifdef TESTING
     {
         psString name = NULL;           // Name of image
@@ -85,23 +83,4 @@
         psFree(name);
         psFitsWriteImage(fits, NULL, outRO->image, 0, NULL);
-        psFitsClose(fits);
-    }
-#endif
-#ifdef INSPECTION_FILES
-    for (int i = 0; i < stack->n; i++) {
-        pmStackData *data = stack->data[i]; // Data for this image
-        if (!data || !data->inspect) {
-            continue;
-        }
-        psImage *inspected = psPixelsToMask(NULL, data->inspect,
-                                            psRegionSet(0, outRO->image->numCols - 1,
-                                                        0, outRO->image->numRows - 1),
-                                            maskBad);
-        psString name = NULL;           // Name of image
-        psStringAppend(&name, "inspect_%03d_%03d.fits", sectionNum, i);
-        psFits *fits = psFitsOpen(name, "w");
-        psFree(name);
-        psFitsWriteImage(fits, NULL, inspected, 0, NULL);
-        psFree(inspected);
         psFitsClose(fits);
     }
@@ -208,26 +187,4 @@
     }
 
-#ifdef REJECTION_FILES
-    if (sectionNum == 0) {
-        for (int i = 0; i < stack->n; i++) {
-            pmStackData *data = stack->data[i]; // Data for this image
-            if (!data || !data->reject) {
-                continue;
-            }
-            psImage *reject = psPixelsToMask(NULL, data->reject,
-                                             psRegionSet(0, outRO->image->numCols - 1,
-                                                         0, outRO->image->numRows - 1),
-                                             maskBad);
-            psString name = NULL;           // Name of image
-            psStringAppend(&name, "reject_%03d.fits", i);
-            psFits *fits = psFitsOpen(name, "w");
-            psFree(name);
-            psFitsWriteImage(fits, NULL, reject, 0, NULL);
-            psFree(reject);
-            psFitsClose(fits);
-        }
-    }
-#endif
-
     if (!pmStackCombine(outRO, stack, maskVal | maskBad, maskBad, 0, 0, NAN,
                         numGood != num, useVariance, false)) {
@@ -239,5 +196,5 @@
     }
 
-#ifdef COMBINED_FILES
+#ifdef TESTING
     {
         psString name = NULL;           // Name of image
