Index: trunk/psphot/src/psphot.c
===================================================================
--- trunk/psphot/src/psphot.c	(revision 5617)
+++ trunk/psphot/src/psphot.c	(revision 5628)
@@ -10,4 +10,5 @@
     psStats     *sky     = NULL;
     pmPSFClump   psfClump;
+    bool         status;
 
     config = psphotArguments (&argc, argv);
@@ -17,4 +18,8 @@
     // we have memory leaks here -- may be from psMetadata
     imdata = psphotSetup (config);
+    char *breakPt = psMetadataLookupPtr (&status, config, "BREAK_POINT");
+    if (!status) {
+      breakPt = psStringCopy ("NONE");
+    }
 
     // measure image stats for initial guess 
@@ -23,26 +28,17 @@
     // find the peaks in the image
     peaks = pmPeaksSigmaLimit (imdata, config, sky);
+    if (!strcasecmp (breakPt, "PEAKS")) exit (0);
 
     // construct sources and measure basic stats
     sources = psphotSourceStats (imdata, config, peaks);
+    if (!strcasecmp (breakPt, "STATS")) exit (0);
 
     // classify sources based on moments, brightness
     // XXX - this has 1 leak
     psfClump = pmSourcePSFClump (sources, config);
-    // psLogMsg ("psphot", 4, "clump  X,  Y: %f, %f\n", psfClump.X, psfClump.Y);
-    // psLogMsg ("psphot", 4, "clump DX, DY: %f, %f\n", psfClump.dX, psfClump.dY);
 
     // group into STAR, COSMIC, GALAXY, SATURATED
     pmSourceRoughClass (sources, config, psfClump);
-
-    // optional dump of all rough source data
-    { 
-      bool status;
-      char *output = psMetadataLookupPtr (&status, config, "MOMENTS_OUTPUT_FILE");
-      if (status && (output != NULL) && (output[0])) {
-	pmMomentsWriteText (sources, output);
-	psFree (output);
-      }
-    }
+    if (!strcasecmp (breakPt, "CLASS")) exit (0);
 
     // source analysis is done in S/N order (brightest first)
@@ -51,10 +47,13 @@
     // use bright stellar objects to measure PSF
     psf = psphotChoosePSF (config, sources, sky);
+    if (!strcasecmp (breakPt, "PSFFIT")) exit (0);
 
     // test PSF on all except SATURATE and DEFECT (artifacts)
     psphotApplyPSF (imdata, config, sources, psf, sky);
+    if (!strcasecmp (breakPt, "PSFSUB")) exit (0);
 
     // fit extended objects with galaxy models
     psphotFitGalaxies (imdata, config, sources, sky);
+    if (!strcasecmp (breakPt, "GALSUB")) exit (0);
 
     // write out data in appropriate format
