Index: /trunk/ppSim/src/Makefile.am
===================================================================
--- /trunk/ppSim/src/Makefile.am	(revision 31156)
+++ /trunk/ppSim/src/Makefile.am	(revision 31157)
@@ -48,5 +48,4 @@
 	ppSimLoop.c		  \
 	ppSimMergeReadouts.c	  \
-	ppSimDetections.c	  \
 	ppSimMergeSources.c	  \
 	ppSimMosaicChip.c	  \
Index: /trunk/ppSim/src/ppSimDetectionLimits.c
===================================================================
--- /trunk/ppSim/src/ppSimDetectionLimits.c	(revision 31156)
+++ /trunk/ppSim/src/ppSimDetectionLimits.c	(revision 31157)
@@ -3,4 +3,5 @@
 // compare injected sources (PPSIM.SOURCES) and measured fake sources (PPSIM.FAKE.SOURCES) 
 // to determine detection limits and recovered magnitude errors
+// XXX this function is not used
 bool ppSimDetectionLimits (pmConfig *config, pmFPAview *view) {
 
Index: /trunk/ppSim/src/ppSimDetections.c
===================================================================
--- /trunk/ppSim/src/ppSimDetections.c	(revision 31156)
+++ /trunk/ppSim/src/ppSimDetections.c	(revision 31157)
@@ -1,4 +1,5 @@
 # include "ppSim.h"
 
+// XXX this function is not used
 bool ppSimDetections (psImage *significance, psMetadata *recipe, psArray *sources) {
     psAssert (sources, "programming error: ppSimDetections passed NULL sources");
@@ -12,5 +13,5 @@
     float SIGMA_SMTH  = psMetadataLookupF32 (&status, recipe, "SIGMA_SMOOTH"); 
     psAssert (status, "SIGMA_SMOOTH missing: call psphotSignificanceImage first"); 
-    float effArea = 4.0*M_PI*PS_SQR(SIGMA_SMTH);
+    // float effArea = 4.0*M_PI*PS_SQR(SIGMA_SMTH);
 
     int row0 = significance->row0;
@@ -23,7 +24,5 @@
 	psAssert (peak, "peak is not defined for the source");
 
-	peak->value = significance->data.F32[peak->y-row0][peak->x-col0];
-	peak->SN = sqrt(peak->value*effArea);
-
+	peak->detValue = significance->data.F32[peak->y-row0][peak->x-col0];
     }
     return true;
Index: /trunk/ppSim/src/ppSimMakeGalaxies.c
===================================================================
--- /trunk/ppSim/src/ppSimMakeGalaxies.c	(revision 31156)
+++ /trunk/ppSim/src/ppSimMakeGalaxies.c	(revision 31157)
@@ -16,7 +16,8 @@
 
     bool galaxyGrid  	  = psMetadataLookupBool(&mdok, recipe, "GALAXY.GRID"); // Density of fakes
-    int galaxyGridDX 	  = psMetadataLookupS32(&mdok, recipe, "GALAXY.GRID.DX"); // Density of fakes
-    int galaxyGridDY 	  = psMetadataLookupS32(&mdok, recipe, "GALAXY.GRID.DY"); // Density of fakes
+    int galaxyGridDX 	  = psMetadataLookupS32 (&mdok, recipe, "GALAXY.GRID.DX"); // Density of fakes
+    int galaxyGridDY 	  = psMetadataLookupS32 (&mdok, recipe, "GALAXY.GRID.DY"); // Density of fakes
     bool galaxyGridRandom = psMetadataLookupBool(&mdok, recipe, "GALAXY.GRID.RANDOM"); // Density of fakes
+    float galaxyGridPeak  = psMetadataLookupF32 (&mdok, recipe, "GALAXY.GRID.PEAK"); // peak flux of fakes
     
     float galaxyRmajorMax = psMetadataLookupF32(&mdok, recipe, "GALAXY.RMAJOR.MAX"); // Density of fakes
@@ -107,8 +108,5 @@
 		galaxy->x    = ix;
 		galaxy->y    = iy;
-
-		// galaxy->peak = 1000;
-		galaxy->peak = bright / 100.0;
-		// fprintf (stderr, "Io: %f\n", bright);
+		galaxy->peak = galaxyGridPeak;
 
 		// galaxyIndex from user should be for function of this form: exp(-r^(1/n))
