Index: /trunk/psphot/src/psphotReadout.c
===================================================================
--- /trunk/psphot/src/psphotReadout.c	(revision 18003)
+++ /trunk/psphot/src/psphotReadout.c	(revision 18004)
@@ -17,5 +17,5 @@
 
     // set the photcode for this image
-    if (!psphotAddPhotcode (recipe, config, view)) {
+    if (!psphotAddPhotcode (recipe, config, view, "PSPHOT.INPUT")) {
         psError (PSPHOT_ERR_CONFIG, false, "trouble defining the photcode");
         return false;
@@ -118,5 +118,5 @@
 
     if (0) { 
-	FILE *out = fopen ("out.dat", "w");
+	FILE *out = fopen ("out.pass1.dat", "w");
 	
 	for (int i = 0; i < sources->n; i++) {
@@ -194,4 +194,24 @@
     psphotFitSourcesLinear (readout, sources, recipe, psf, TRUE);
 
+    if (0) { 
+	FILE *out = fopen ("out.pass2.dat", "w");
+	
+	for (int i = 0; i < sources->n; i++) {
+	    pmSource *source = sources->data[i];
+	    if (!source) continue;
+	    pmPeak *peak = source->peak;
+	    if (!peak) continue;
+	    pmModel *model = source->modelPSF;
+	    if (!model) continue;
+	    if (!model->params) continue;
+	    
+	    fprintf (out, "%d %f %f  %f %f  %f %f\n", 
+		     i, peak->xf, peak->yf, peak->flux, peak->SN,
+		     model->params->data.F32[PM_PAR_I0],
+		     model->dparams->data.F32[PM_PAR_I0]);
+	}
+	fclose (out);
+    }
+
 pass1finish:
 
