Index: trunk/ppSim/src/ppSimInsertStars.c
===================================================================
--- trunk/ppSim/src/ppSimInsertStars.c	(revision 27533)
+++ trunk/ppSim/src/ppSimInsertStars.c	(revision 27657)
@@ -145,7 +145,13 @@
     fclose (outfile);
 
-    // NOTE: the pmFPAfile "PPSIM.OUTPUT" points at these sources
-    psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "fake sources", sources);
-    psFree(sources);
+    pmDetections *detections = pmDetectionsAlloc();
+    detections->allSources = sources;
+
+    // save detections on the readout->analysis
+    if (!psMetadataAddPtr (readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN, "fake sources", detections)) {
+	psError (PSPHOT_ERR_CONFIG, false, "problem saving detections on readout");
+	return false;
+    }
+    psFree(detections);
 
     // XXX many leaks in here, i think
