Index: trunk/psphot/src/psphotReadout.c
===================================================================
--- trunk/psphot/src/psphotReadout.c	(revision 7731)
+++ trunk/psphot/src/psphotReadout.c	(revision 7758)
@@ -8,4 +8,7 @@
     // find the currently selected readout
     pmReadout  *readout = pmFPAfileThisReadout (config->files, view, "PSPHOT.INPUT");
+
+    // optional break-point for processing
+    char *breakPt = psMetadataLookupStr (NULL, recipe, "BREAK_POINT");
 
     // XXX does this need to invoke I/O?
@@ -34,9 +37,14 @@
     // limit moments analysis by S/N?
     psArray *sources = psphotSourceStats (readout, recipe, peaks);
+    psFree (peaks);
+
+    if (!strcasecmp (breakPt, "PEAKS")) {
+	psphotReadoutCleanup (config, readout, recipe, NULL, sources);
+	return true;
+    }
 
     // classify sources based on moments, brightness
     // faint sources not classified?
     if (!psphotRoughClass (sources, recipe)) {
-        psFree (peaks);
         psFree (sources);
         psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
@@ -44,4 +52,8 @@
         pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
         return false;
+    }
+    if (!strcasecmp (breakPt, "MOMENTS")) {
+	psphotReadoutCleanup (config, readout, recipe, NULL, sources);
+	return true;
     }
 
@@ -51,8 +63,15 @@
     // use bright stellar objects to measure PSF
     pmPSF *psf = psphotChoosePSF (readout, sources, recipe);
-    psphotPSFstats (readout, recipe, psf);
+    if (!strcasecmp (breakPt, "PSFMODEL")) {
+	psphotReadoutCleanup (config, readout, recipe, psf, sources);
+	return true;
+    }
 
     // linear PSF fit to peaks
     psphotEnsemblePSF (readout, sources, recipe, psf, FALSE);
+    if (!strcasecmp (breakPt, "ENSEMBLE")) {
+	psphotReadoutCleanup (config, readout, recipe, psf, sources);
+	return true;
+    }
 
     // non-linear PSF and EXT fit to brighter sources
@@ -80,7 +99,4 @@
     psphotMagnitudes (sources, recipe, psf);
 
-    // create an output header with stats results
-    psMetadata *header = psphotDefineHeader (recipe);
-
     // replace background in residual image
     psphotSkyReplace (config, view);
@@ -89,4 +105,21 @@
     psphotSourceFreePixels (sources);
     // psphotSaveImage (NULL, readout->image, "resid.fits");
+
+    // create the exported-metadata and free local data
+    psphotReadoutCleanup (config, readout, recipe, psf, sources);
+    return true;
+}
+
+bool psphotReadoutCleanup (pmConfig *config, pmReadout *readout, psMetadata *recipe, pmPSF *psf, psArray *sources) {
+
+    // use the psf-model to measure FWHM stats
+    if (psf) {
+	psphotPSFstats (readout, recipe, psf);
+    } else {
+	psphotMomentsStats (readout, recipe, sources);
+    }
+
+    // create an output header with stats results
+    psMetadata *header = psphotDefineHeader (recipe);
 
     // save the results of the analysis
@@ -99,9 +132,8 @@
     pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
 
-    // free up the local copies of the data
-    psFree (peaks);
-    psFree (sources);
     psFree (psf);
     psFree (header);
+    psFree (sources);
+
     return true;
 }
