Index: trunk/ppSim/src/ppSimInsertStars.c
===================================================================
--- trunk/ppSim/src/ppSimInsertStars.c	(revision 18011)
+++ trunk/ppSim/src/ppSimInsertStars.c	(revision 20318)
@@ -68,4 +68,11 @@
     psArray *sources = psArrayAllocEmpty (stars->n);
 
+    // output filename
+    char outname[1024];
+    char *outroot = psMetadataLookupStr(&mdok, config->arguments, "OUTPUT");
+    sprintf (outname, "%s.dat", outroot);
+
+    FILE *outfile = fopen (outname, "w");
+
     // add sources to the readout image & weight
     psTrace("ppSim", 1, "Inserting %ld stars...\n", stars->n);
@@ -114,4 +121,6 @@
         source->errMag = sqrt(Area*PS_SQR(roughNoise) + flux) / flux;
 
+        fprintf (outfile, "%8.3f %8.3f  %10.2f  %7.3f %5.3f\n", star->x, star->y, star->flux, source->psfMag, source->errMag);
+
         // insert the source flux in the image
         pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY);
@@ -131,4 +140,5 @@
         psFree(source);                 // Drop reference
     }
+    fclose (outfile);
 
     // NOTE: the pmFPAfile "PPSIM.OUTPUT" points at these sources
