Index: /trunk/psphot/src/psphotReadout.c
===================================================================
--- /trunk/psphot/src/psphotReadout.c	(revision 12706)
+++ /trunk/psphot/src/psphotReadout.c	(revision 12707)
@@ -2,4 +2,6 @@
 
 bool psphotReadout (pmConfig *config, pmFPAview *view) {
+
+    bool dump = (psTraceGetLevel("psphot") >= 6);
 
     // select the current recipe
@@ -36,5 +38,5 @@
     psphotModelTest (readout, recipe);
 
-    if (psTraceGetLevel("psphot") > 5) {
+    if (psTraceGetLevel("psphot") >= 5) {
         psphotSaveImage (NULL, readout->image,  "image.fits");
         psphotSaveImage (NULL, readout->mask,   "mask.fits");
@@ -61,5 +63,4 @@
 	return psphotReadoutCleanup (config, readout, recipe, NULL, NULL);
     }
-    pmPeaksWriteText (peaks, "oldpeaks.dat");
 
     // construct sources and measure basic stats
@@ -105,9 +106,9 @@
     psphotGuessModels (readout, sources, recipe, psf);
 
-    psphotSaveImage (NULL, readout->image,  "image.v0.fits");
+    if (dump) psphotSaveImage (NULL, readout->image,  "image.v0.fits");
 
     // linear PSF fit to peaks
     psphotEnsemblePSF (readout, sources, recipe, psf, FALSE);
-    psphotSaveImage (NULL, readout->image,  "image.v1.fits");
+    if (dump) psphotSaveImage (NULL, readout->image,  "image.v1.fits");
     if (!strcasecmp (breakPt, "ENSEMBLE")) {
         goto finish;
@@ -116,13 +117,13 @@
     // non-linear PSF and EXT fit to brighter sources
     psphotBlendFit (readout, sources, recipe, psf);
-    psphotSaveImage (NULL, readout->image,  "image.v2.fits");
+    if (dump) psphotSaveImage (NULL, readout->image,  "image.v2.fits");
 
     // replace all sources
     psphotReplaceAll (sources);
-    psphotSaveImage (NULL, readout->image,  "image.v3.fits");
+    if (dump) psphotSaveImage (NULL, readout->image,  "image.v3.fits");
 
     // linear PSF fit to remaining peaks
     psphotEnsemblePSF (readout, sources, recipe, psf, TRUE);
-    psphotSaveImage (NULL, readout->image,  "image.v4.fits");
+    if (dump) psphotSaveImage (NULL, readout->image,  "image.v4.fits");
     if (!strcasecmp (breakPt, "PASS1")) {
         goto finish;
@@ -140,5 +141,4 @@
     // find the peaks in the image
     psArray *newPeaks = psphotFindPeaks (readout, recipe, 2);
-    pmPeaksWriteText (newPeaks, "newpeaks.dat");
 
     // remove noise for subtracted objects
@@ -157,5 +157,5 @@
     // replace all sources
     psphotReplaceAll (sources);
-    psphotSaveImage (NULL, readout->image,  "image.v5.fits");
+    if (dump) psphotSaveImage (NULL, readout->image,  "image.v5.fits");
 
     // merge the newly selected peaks into the existing list
@@ -165,10 +165,10 @@
     // linear PSF fit to remaining peaks
     psphotEnsemblePSF (readout, sources, recipe, psf, TRUE);
-    psphotSaveImage (NULL, readout->image,  "image.v6.fits");
+    if (dump) psphotSaveImage (NULL, readout->image,  "image.v6.fits");
 
 finish:
 
     // plot positive sources 
-    psphotSourcePlots (readout, sources, recipe);
+    // psphotSourcePlots (readout, sources, recipe);
 
     // measure aperture photometry corrections
@@ -180,5 +180,4 @@
 
     // calculate source magnitudes
-    // XXX modify this API to take config, view?
     pmReadout *background = psphotSelectBackground (config, view);
     psphotMagnitudes(sources, recipe, psf, background);
