Index: trunk/psphot/src/modelTestFitSource.c
===================================================================
--- trunk/psphot/src/modelTestFitSource.c	(revision 5755)
+++ trunk/psphot/src/modelTestFitSource.c	(revision 5802)
@@ -67,4 +67,6 @@
     source->peak->counts = source->moments->Peak;
 
+    fprintf (stderr, "sum: %f\n", source->moments->Sum);
+
     // get the initial model parameter guess
     pmModel *model = pmSourceModelGuess (source, modelType);
@@ -73,10 +75,24 @@
     psF32 *params = model->params->data.F32;
     for (int i = 0; i < nParams; i++) {
+	if (i == 2) {
+	    params[i] = xObj;
+	    continue;
+	}
+	if (i == 3) {
+	    params[i] = yObj;
+	    continue;
+	}
 	sprintf (name, "TEST_FIT_PAR%d", i);
 	value = psMetadataLookupF32 (&status, config, name);
 	if (status) {
+	    fprintf (stderr, "using supplied value %f for PAR %d\n", value, i);
 	    params[i] = value;
+	} else {
+	    fprintf (stderr, "using guessed  value %f for PAR %d\n", params[i], i);
 	}
     }
+
+    float area = params[4]*params[5];
+    fprintf (stderr, "peak: %f\n", source->moments->Sum*area);
 
     // what fitting mode to use?
@@ -98,4 +114,8 @@
     pmSourceSubModel (source->pixels, source->mask, model, false, false);
     
+    for (int i = 0; i < nParams; i++) {
+	fprintf (stderr, "result value %f for PAR %d\n", params[i], i);
+    }
+
     // write out 
     DumpImage (source->pixels, "resid.fits");
