PyREx

pyrex.io.EventIterator

class pyrex.io.EventIterator(hdf5_file, slice_range=None, start_event=None, stop_event=None, step=None)

Class for iterating over event data from an hdf5 file.

Stores data for a chunk of events according to the slice_range. Increasing the slice_range should result in an improvement in speed, while decreasing it should result in an improvement in memory consumption.

Parameters
hdf5_file

Open file object to be read from.

slice_rangeint, optional

Number of events to include in each slice when iterating the file.

start_eventint, optional

Event index of the file from which to start iteration.

stop_eventint, optional

Event index of the file at which to stop iteration (this event will not be included in the iteration).

stepint, optional

Step size of the iterator. Must be greater than zero.

Attributes
triggered

Whether or not the event triggered the detector.

noise_bases

Noise bases for each antenna of the event for reproducing noise.

is_neutrino

Whether the event’s initial particle is a neutrino.

flavor

Flavor of the event’s initial particle.

is_nubar

Whether the event’s initial particle is an anti-neutrino.

Methods

get_data(dataset[, attribute])

Get data from a given dataset.

get_particle_info([attribute])

Get particle data for the event.

get_rays_info([attribute])

Get ray path data for the event.

get_triggered_components([ray])

Get the components of the detector triggered by the event.

get_waveforms([antenna_id, waveform_type])

Get waveform data for the event.

PyREx

A Python package for simulation of neutrinos and radio antennas in ice. Version 1.10.0

Navigation