Index: /branches/eam_branch_20080511/ppSim/src/ppSimPhotomReadout.c
===================================================================
--- /branches/eam_branch_20080511/ppSim/src/ppSimPhotomReadout.c	(revision 17850)
+++ /branches/eam_branch_20080511/ppSim/src/ppSimPhotomReadout.c	(revision 17851)
@@ -23,4 +23,7 @@
     PS_ASSERT_PTR_NON_NULL (readout, false);
 
+    pmReadout *realSourceReadout = pmFPAfileThisReadout (config->files, view, "PPSIM.REAL.SOURCES");
+    PS_ASSERT_PTR_NON_NULL (realSourceReadout, false);
+
     // Generate the mask and weight images, including the user-defined analysis region of interest
     psphotSetMaskAndWeight (config, readout, recipe);
@@ -33,10 +36,10 @@
     // load the source lists
     // PPSIM.REAL.SOURCES carries the pmSource objects (from psphot analysis or loaded externally)
-    psArray *realSources = psMetadataLookupPtr (NULL, readout->analysis, "PPSIM.REAL.SOURCES");
+    psArray *realSources = psMetadataLookupPtr (NULL, realSourceReadout->analysis, "PSPHOT.SOURCES");
     psArray *forceSources = ppSimLoadForceSources (config, view);
 
     // XXX make a copy of the fake-source parameters so these can be saved independently 
     // from the measured fake-source parameters
-    psArray *injectedSources = psMetadataLookupPtr (NULL, readout->analysis, "PPSIM.SOURCES");
+    psArray *injectedSources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.SOURCES");
     psArray *fakeSources = psArrayAlloc (injectedSources->n);
     for (int i = 0; i < injectedSources->n; i++) {
@@ -115,6 +118,7 @@
 
     // add forceSources to the readout (real and fake already there)
-    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PPSIM.FAKE.SOURCES", PS_DATA_ARRAY, "fake photometry ", fakeSources);
-    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PPSIM.FORCE.SOURCES", PS_DATA_ARRAY, "forced photometry ", forceSources);
+    // these are outputs: we need to generate the fpa structure
+    // psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PPSIM.FAKE.SOURCES", PS_DATA_ARRAY, "fake photometry ", fakeSources);
+    // psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PPSIM.FORCE.SOURCES", PS_DATA_ARRAY, "forced photometry ", forceSources);
     psFree (forceSources);
     return true;
