Eventio

Latest version: v1.12.1

Safety actively analyzes 638346 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 10

1.5.1.post1

1.5.1

* Fix dtype of true cherenkov photo-electron image (float32 -> int32)
* Allow access to simtel history from `SimTelFile`

1.4.2

* Fix reading of `PixelDisabled` objects when `n_trigger_disabled` != `n_HV_disabled`. PR: 219, issue 218

1.4.1

* Introduce `EventIOFile.peek` to look at the next eventio object in a file without advancing the iterator.
Beware, that this might prevent from reading the previous object if the file is not back-seekable.
To be safe, only call peek *after* reading/parsing the current object.
* Fix that `SimTelFile.iter_mc_events` had the wrong `TelescopeData`. It always used the last available, which was either the one from the previous event or even older since events might not have `TelescopeData` at all

1.4.0

* Change to the `PhotoElectrons[1208]` object: store photoelectrons and amplitudes in 1d-arrays together with an array of pixel ids instead of lists of lists. This brings a considerable performance improvement, both for reading this data from simtel files and for dealing with the data.

See https://numpy.org/doc/stable/reference/generated/numpy.ufunc.at.html for how to do operations on these pairs of indices / values arrays, e.g. to compute the mean arrival time in each pixel, you could use:

python
def mean_at(n, array, indices):
mean = np.zeros(len(n))
np.add.at(mean, indices, array)

avoid divide by zero warning
mask = n > 0
mean[mask] /= n[mask]
mean[~mask] = np.nan
return mean

mean_time = mean_at(pe['photoelectrons'], pe['time'], pe['pixel_id'])


* The `photon_counts` field of the `PhotoElectrons[1208]` object was renamed to `photons`

Thanks watsonjj for implementing this in https://github.com/cta-observatory/pyeventio/pull/207

1.3.0

* Support sim_telarray files that include the full corsika photon information 206

Page 4 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.