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

Implement reading of photoelectrons for calibration events, fixes #250 #252

Closed maxnoe closed 2 years ago

maxnoe commented 2 years ago

With this, ctapipe can now get the true image for calibration events, given the simulation files contain them:

In [1]: from ctapipe.io import EventSource

In [2]: s = EventSource('tests/resources/calib_true_pe.simtel.zst', skip_calibration_events=False)

In [3]: e = next(iter(s))

In [4]: e.simulation.tel[1].true_image
Out[4]: array([5, 3, 0, ..., 2, 2, 2], dtype=int32)
codecov[bot] commented 2 years ago

Codecov Report

Merging #252 (8715c86) into master (75eed0e) will decrease coverage by 0.08%. The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
- Coverage   86.46%   86.38%   -0.09%     
==========================================
  Files          24       24              
  Lines        2172     2188      +16     
==========================================
+ Hits         1878     1890      +12     
- Misses        294      298       +4     
Impacted Files Coverage Δ
src/eventio/simtel/objects.py 80.95% <75.00%> (-0.03%) :arrow_down:
src/eventio/simtel/simtelfile.py 96.74% <75.00%> (-1.12%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.