Index: /branches/eam_branches/ipp-20110710/ppSim/src/ppSimInsertStars.c
===================================================================
--- /branches/eam_branches/ipp-20110710/ppSim/src/ppSimInsertStars.c	(revision 32286)
+++ /branches/eam_branches/ipp-20110710/ppSim/src/ppSimInsertStars.c	(revision 32287)
@@ -6,4 +6,5 @@
     PTR = NULL;
 
+float imageSum (psImage *image);
 
 bool ppSimInsertStars (pmReadout *readout, psImage *expCorr, psArray *stars, pmConfig *config) {
@@ -111,4 +112,5 @@
 	float radius = model->modelRadius (model->params, nSigmaLim * roughNoise);
 	radius = PS_MAX (radius, 1.0);
+	radius = 20.0;
 
 	// construct a source, with model flux pixels set, based on the model
@@ -127,5 +129,5 @@
 
 	float par8 = (model->params->n == 8) ? model->params->data.F32[7] : 0.0;
-	fprintf (outfile, "%8.3f %8.3f %10.2f  %2d  %7.3f %5.3f  %5.3f %5.3f %5.3f %5.3f\n", star->x, star->y, star->flux, 0, source->psfMag, source->psfMagErr, axes.major, axes.minor, axes.theta, par8);
+	float starFlux = 0.0;
 
 	// if psfConvolve is TRUE, we will (elsewhere) convolve the image we a PSF
@@ -135,5 +137,8 @@
 	} else {
 	    // insert the source flux in the image
+	    float sum1 = imageSum(source->pixels);
 	    pmSourceAddWithOffset (source, PM_MODEL_OP_FULL, 0xff, dX, dY);
+	    float sum2 = imageSum(source->pixels);
+	    starFlux = sum2 - sum1;
 	    
 	    // insert the source flux in the noise image
@@ -149,4 +154,5 @@
 	    RESET(source->blends);
 	}
+	fprintf (outfile, "%8.3f %8.3f %10.2f  %2d  %7.3f %5.3f  %5.3f %5.3f %5.3f %5.3f  :  %f %f\n", star->x, star->y, starFlux, 0, source->psfMag, source->psfMagErr, axes.major, axes.minor, axes.theta, par8, model->params->data.F32[PM_PAR_I0], radius);
 
 	// add the sources to the source array
