Index: /branches/eam_branch_20090208/psphot/src/psphotDetectReadout.c
===================================================================
--- /branches/eam_branch_20090208/psphot/src/psphotDetectReadout.c	(revision 21449)
+++ /branches/eam_branch_20090208/psphot/src/psphotDetectReadout.c	(revision 21450)
@@ -22,7 +22,4 @@
     // Generate the mask and weight images, including the user-defined analysis region of interest
     psphotSetMaskAndWeight (config, readout, recipe);
-    if (!strcasecmp (breakPt, "NOTHING")) {
-        return psphotReadoutCleanup(config, readout, recipe, NULL, NULL, NULL);
-    }
 
     // load the psf model, if suppled.  FWHM_X,FWHM_Y,etc are saved in the recipe
@@ -38,22 +35,5 @@
 
     // include externally-supplied sources (supplied as PSPHOT.INPUT.CMF)
-    pmDetections *detections = psphotDetectionsFromSources (config, inSources);
-    if (!detections || !detections->peaks) {
-        psError(PSPHOT_ERR_ARGUMENTS, true, "Can't find PSF stars");
-        return psphotReadoutCleanup(config, readout, recipe, detections, NULL, NULL);
-    }
-
-    // construct sources and measure basic stats
-    psArray *sources = psphotSourceStats (config, readout, detections);
-    if (!sources) return false;
-    if (!strcasecmp (breakPt, "PEAKS")) {
-        return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);
-    }
-
-    // classify sources based on moments, brightness
-    if (!psphotRoughClass (readout, sources, recipe, havePSF)) {
-        psLogMsg ("psphot", 3, "failed to find a valid PSF clump for image");
-        return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources);
-    }
+    psphotSetSourceParams (config, sources, psf);
 
     // calculate source magnitudes
@@ -63,2 +43,12 @@
     return psphotReadoutCleanup(config, readout, recipe, detections, psf, sources);
 }
+
+// deep in pmSourcePixelWeight, we need the following items for each location of interest:
+// pmModel *model (should be a realized version of the PSF, can have unity normalization)
+// psImage *mask  (local subimage of mask for source)
+// psImageMaskType maskVal (from recipe & mask header)
+
+{ 
+    pmModel *model = pmModelFromPSFforXY (psf, x, y, 1.0);
+}
+
