Index: trunk/psphot/src/psphotReadout.c
===================================================================
--- trunk/psphot/src/psphotReadout.c	(revision 6851)
+++ trunk/psphot/src/psphotReadout.c	(revision 6862)
@@ -1,5 +1,4 @@
 # include "psphot.h"
 
-// XXX 2006.03.28 : no leaks!
 bool psphotReadout (pmConfig *config, pmFPAview *view) {
 
@@ -18,5 +17,4 @@
     // XXX move this input the psphotImageLoop level?
     pmReadoutSetWeights (readout);
-    psphotSaveImage (NULL, readout->weight, "weight.fits");
 
     // I have a valid mask, now mask in the analysis region of interest
@@ -44,5 +42,6 @@
 
     // use bright stellar objects to measure PSF
-    psf = psphotChoosePSF (sources, recipe);
+    psf = psphotChoosePSF (readout, sources, recipe);
+    psphotPSFstats (readout, recipe, psf);
 
     // linear PSF fit to peaks
@@ -52,4 +51,5 @@
     psphotBlendFit (readout, sources, recipe, psf);
 
+    // XXX this was an attempt to measure bias due to the weighting.
     // psphotWeightBias (readout, sources, recipe, psf);
 
@@ -91,13 +91,2 @@
     return true;
 }
-
-# if (0)
-fprintf (stderr, "making fake sources\n");
-sources = psphotFakeSources ();
-psMetadata *tmp = psMetadataAlloc ();
-status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY,    "psphot sources", sources);
-status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.HEADER",  PS_DATA_METADATA, "header stats", tmp);
-psFree (sources);
-psFree (tmp);
-return true;
-# endif
