Index: trunk/psphot/src/psphot-utils.c
===================================================================
--- trunk/psphot/src/psphot-utils.c	(revision 4375)
+++ trunk/psphot/src/psphot-utils.c	(revision 4398)
@@ -52,4 +52,24 @@
     fclose (f);
     return true;
+}
+
+bool DumpPSFTestData (pmPSF_Test *test, char *filename) 
+{
+
+  FILE *f = fopen (key, "w");
+
+  for (int j = 0; j < test->sources->n; j++) {
+
+    psSource *source = test->sources->data[j];
+    psModel  *model  = test->modelPSF->data[j];	    
+
+    float sky = 0;
+    if (model != NULL) sky = model->params->data.F32[0];
+
+    fprintf (f, "%3d %6.1f %6.1f  %7.4f %7.4f  %8.4f\n", 
+	     j, source->moments->x, source->moments->y,
+	     test->metric->data.F64[j], test->fitMag->data.F64[j], sky);
+  }
+  fclose (f);
 }
 
