Index: /branches/eam_branches/20091201/psphot/src/psphotReadoutFindPSF.c
===================================================================
--- /branches/eam_branches/20091201/psphot/src/psphotReadoutFindPSF.c	(revision 26420)
+++ /branches/eam_branches/20091201/psphot/src/psphotReadoutFindPSF.c	(revision 26421)
@@ -57,4 +57,9 @@
     }
 
+    if (!psphotImageQuality (recipe, sources)) {
+        psLogMsg("psphot", 3, "failed to measure image quality");
+        return psphotReadoutCleanup(config, readout, recipe, detections, NULL, sources);
+    }
+
     pmPSF *psf = psphotChoosePSF(readout, sources, recipe);
     if (!psf) {
@@ -65,4 +70,10 @@
     psphotVisualShowPSFModel(readout, psf);
 
+    // measure aperture photometry corrections
+    if (!psphotApResid (config, readout, sources, psf)) {
+        psLogMsg ("psphot", 3, "failed on psphotApResid");
+        return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources);
+    }
+
     // drop the references to the image pixels held by each source
     psphotSourceFreePixels(sources);
