Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotApResid.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotApResid.c	(revision 29533)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotApResid.c	(revision 29534)
@@ -48,14 +48,4 @@
     pmReadout *readout = pmFPAviewThisReadout(view, file->fpa);
     psAssert (readout, "missing readout?");
-
-    // XXX TEST output
-    { 
-	char outname[64];
-	static int nimage = 0;
-
-	sprintf (outname, "testimage.%02d.fits", nimage);
-	psphotSaveImage(NULL, readout->image, outname);
-	nimage ++;
-    }
 
     pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c	(revision 29533)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c	(revision 29534)
@@ -31,4 +31,7 @@
 float psphotSourceSizeFindThreshold (psVector *value, psVector *mask, int maskValue, float minValue, float maxValue, float delta, float guess, float fraction);
 
+// save test output images?
+# define DUMPPICS 0
+
 // we need to call this function after sources have been fitted to the PSF model and
 // subtracted.  To determine the CR-nature, this function examines the 9 pixels in the 3x3
@@ -659,12 +662,11 @@
 
     // XXX test : save the mask image
-    if (1) {
-        psphotSaveImage (NULL, readout->mask,   "crmask.fits");
-    }
+# if (DUMPPICS)
+    psphotSaveImage (NULL, readout->mask,   "crmask.fits");
+# endif
 
     return true;
 }
 
-# define DUMPPICS 0
 # define LIMIT_XRANGE(X, IMAGE) { X = PS_MIN(PS_MAX(0, X), IMAGE->numCols); }
 # define LIMIT_YRANGE(Y, IMAGE) { Y = PS_MIN(PS_MAX(0, Y), IMAGE->numRows); }
