Index: branches/eam_branches/psphot.stack.20100120/src/psphotReadoutCleanup.c
===================================================================
--- branches/eam_branches/psphot.stack.20100120/src/psphotReadoutCleanup.c	(revision 26691)
+++ branches/eam_branches/psphot.stack.20100120/src/psphotReadoutCleanup.c	(revision 26748)
@@ -58,5 +58,5 @@
     // use the psf-model to measure FWHM stats
     if (psf) {
-        if (!psphotPSFstats (readout, recipe, psf)) {
+        if (!psphotPSFstats (readout, psf)) {
             psError(PSPHOT_ERR_PROG, false, "Failed to measure PSF shape parameters");
             return false;
@@ -65,5 +65,5 @@
     // otherwise, use the source moments to measure FWHM stats
     if (!psf && sources) {
-        if (!psphotMomentsStats (readout, recipe, sources)) {
+        if (!psphotMomentsStats (readout, sources)) {
             psError(PSPHOT_ERR_PROG, false, "Failed to measure Moment shape parameters");
             return false;
@@ -82,8 +82,6 @@
     }
 
-    // create an output header with stats results XXX this needs to be reworked :
-    // psphotImageQuality and others need to write these values to a header.  that needs to be
-    // stored on the readout->analysis
-    psMetadata *header = psphotDefineHeader (recipe);
+    // create an output header with stats results currently saved on readout->analysis
+    psMetadata *header = psphotDefineHeader (readout->analysis);
 
     // write NSTARS to the image header
