pyrex.io.HDF5Reader¶
-
class
pyrex.io.
HDF5Reader
(filename, slice_range=None)¶ Class for reading data from an hdf5 file.
Works as a context manager and allows for reading simulation/real data or analysis-level data from the given file.
- Parameters
- filenamestr
File name to open in read mode.
- slice_rangeint, optional
Number of events to include in each slice when iterating the file. Loads the entire file at once by default. For large files specifying a value will result in the file being read in chunks, allowing for reduced memory consumption at the cost of some speed.
See also
pyrex.io.EventIterator
Class for iterating over event data from an hdf5 file.
- Attributes
- filenamestr
Name of the file (to be) opened.
is_open
Boolean of whether the file is currently open.
antenna_info
Antenna data from the file.
file_metadata
Metadata from the file’s metadata datasets.
Methods
close
()Close the hdf5 file.
get_waveforms
([event_id, antenna_id, …])Get waveform data from the file.
open
()Open the hdf5 file for reading.