Index: trunk/psphot/src/psphotStackReadout.c
===================================================================
--- trunk/psphot/src/psphotStackReadout.c	(revision 34335)
+++ trunk/psphot/src/psphotStackReadout.c	(revision 34336)
@@ -121,4 +121,5 @@
     }
 
+#ifdef MAKE_CHISQ_IMAGE
     // also make the chisq detection image
     if (!psphotStackChisqImage(config, view, STACK_DET, STACK_SRC)) {
@@ -126,4 +127,5 @@
         return psphotReadoutCleanup (config, view, STACK_SRC);
     }
+#endif
     if (!strcasecmp (breakPt, "CHISQ")) {
 	return psphotReadoutCleanup (config, view, STACK_SRC);
@@ -204,7 +206,7 @@
     // window of size PSF_MOMENTS_RADIUS (same window used to measure the psf-scale moments)
     // but iterates to an appropriately larger size
-    logMemStats("before.kron.1");
+        logMemStats("before.kron.1");
     psphotKronIterate(config, view, STACK_SRC, 1);
-    logMemStats("after.kron.1");
+        logMemStats("after.kron.1");
 
     // identify CRs and extended sources
@@ -375,5 +377,5 @@
 
         // NOTE: we always do the radial apertures analysis on the convolved image since
-        // those are the ones that are psf matched and the source of STACK_OUT's pixels
+        // those are the ones that are psf matched and are the source of STACK_OUT's pixels
         // XXX: Actually if PSPHOT.STACK.MATCH.PSF.SOURCE were set to RAW this wouldn't be true.
         // but in that case we don't get past the psf matching step because there is no
@@ -460,4 +462,5 @@
     psphotSourceFreePixels (config, view, STACK_SRC);
 
+#ifdef MAKE_CHISQ_IMAGE
     // remove chisq image from config->file:PSPHOT.INPUT
     psphotStackRemoveChisqFromInputs(config, STACK_DET);
@@ -465,4 +468,5 @@
 	psphotStackRemoveChisqFromInputs(config, STACK_SRC);
     }
+#endif
 
     psFree (objects);
@@ -498,4 +502,5 @@
 // This will only work on a system that has /proc (not MacOS for instance) but since this function just
 // tries to open and read from a file it is safe
+// XXX: refine this and move it to psLib
 static void logMemStats(const char *heading) {
 
@@ -519,5 +524,5 @@
     }
   
-    // assuming 4 KB page size here
+    // XXX: assuming 4 KB page size here
 #   define PAGES_TO_MB(_v) (_v * 4.096 / 1024.)
     psLogMsg ("psphot", PS_LOG_INFO, "Memory usage at %20s: Total VmSize: %8.2f MB   Resident %8.2f MB   Data: %8.2f MB\n",
