summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chroma/sim.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/chroma/sim.py b/chroma/sim.py
index a8b0c90..1ffa7f3 100644
--- a/chroma/sim.py
+++ b/chroma/sim.py
@@ -145,6 +145,8 @@ class Simulation(object):
if isinstance(first_element, event.Event):
iterable = self.photon_generator.generate_events(iterable)
+ elif isinstance(first_element, event.Photons):
+ iterable = (event.Event(photons_beg=x) for x in iterable)
for ev in iterable:
gpu_photons_no_scatter = gpu.GPUPhotons(ev.photons_beg, ncopies=nreps)