cta-observatory / pyeventio

Python read-only implementation for the EventIO data format used by the CORSIKA 7 IACT extension and sim_telarray
MIT License
10 stars 12 forks source link

Reading all events in simtel file? #260

Closed moralejo closed 1 year ago

moralejo commented 1 year ago

https://github.com/cta-observatory/pyeventio/blob/94ebedd3c38ed10810a3aa9eafd734c986fdf56e/src/eventio/simtel/simtelfile.py#L144-L145

The SimTelFile iterator seems to be reading only triggered events. Is it possible to read also events in which none of the telescopes triggered? Some information (like the true numbers of photoelectrons on the camera) are available and are useful for some purposes.

maxnoe commented 1 year ago

Yes, there is iter_mc_events():

for e in f.iter_mc_events():
    ...

which should do that.

There is also this pull request here: https://github.com/cta-observatory/pyeventio/pull/214

Which is open since a long time, but which we should probably finish... maybe you can try it out and give feedback, if it solves your particular issue

maxnoe commented 1 year ago

I just rebased the #214 branch with the current main, let's see if we can finally get this in

maxnoe commented 1 year ago

I am closing this as a duplicate of #213

moralejo commented 1 year ago

Ok, thanks!