Index: trunk/psphot/src/psphotReadout.c
===================================================================
--- trunk/psphot/src/psphotReadout.c	(revision 20829)
+++ trunk/psphot/src/psphotReadout.c	(revision 21166)
@@ -79,5 +79,5 @@
 
     // construct sources and measure basic stats
-    psArray *sources = psphotSourceStats (readout, recipe, detections);
+    psArray *sources = psphotSourceStats (config, readout, detections);
     if (!sources) return false;
     if (!strcasecmp (breakPt, "PEAKS")) {
@@ -178,5 +178,5 @@
 
     // non-linear PSF and EXT fit to brighter sources
-    psphotBlendFit (readout, sources, recipe, psf);
+    psphotBlendFit (config, readout, sources, psf);
 
     // replace all sources
@@ -207,5 +207,5 @@
 
     // define new sources based on only the new peaks
-    psArray *newSources = psphotSourceStats (readout, recipe, detections);
+    psArray *newSources = psphotSourceStats (config, readout, detections);
 
     // set source type
@@ -243,5 +243,5 @@
 
     // measure aperture photometry corrections
-    if (!psphotApResid (readout, sources, recipe, psf)) {
+    if (!psphotApResid (config, readout, sources, psf)) {
         psLogMsg ("psphot", 3, "failed on psphotApResid");
         return psphotReadoutCleanup (config, readout, recipe, detections, psf, sources);
@@ -249,5 +249,5 @@
 
     // calculate source magnitudes
-    psphotMagnitudes(config, view, sources, recipe, psf);
+    psphotMagnitudes(config, readout, view, sources, psf);
 
     // replace failed sources?
