Index: trunk/ppSim/src/ppSimInsertStars.c
===================================================================
--- trunk/ppSim/src/ppSimInsertStars.c	(revision 20318)
+++ trunk/ppSim/src/ppSimInsertStars.c	(revision 20367)
@@ -118,5 +118,6 @@
         psF64 Area = 2.0 * M_PI * axes.major * axes.minor;
 
-        source->psfMag = -2.5*log10(flux);
+	// this value is the pure (input) flux, and is saved in the output source cmf files
+        source->psfMag = -2.5*log10(star->flux);
         source->errMag = sqrt(Area*PS_SQR(roughNoise) + flux) / flux;
 
@@ -125,4 +126,6 @@
         // insert the source flux in the image
         pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY);
+
+        // insert the source flux in the noise image
         pmSourceAddWithOffset (source, PM_MODEL_OP_FULL | PM_MODEL_OP_NOISE, 0xff, dX, dY);
 
