PyREx

pyrex.File

class pyrex.File(filename, mode='r', **kwargs)

Class for reading or writing data files.

Works as a context manager and allows for reading or writing simulation/real data or analysis-level data to the given file. Chooses the appropriate class for handling the given file type.

Parameters
filenamestr

File name to open in the given write mode.

modestr, optional

Mode with which to open the file.

**kwargs

Keyword arguments passed on to the appropriate file handler.

See also

pyrex.io.HDF5Reader

Class for reading data from an hdf5 file.

pyrex.io.HDF5Writer

Class for writing data to an hdf5 file.

Attributes
readersdict

Dictionary with file extensions as keys and values with the corresponding classes used to handle reading of those file types.

writersdict

Dictionary with file extensions as keys and values with the corresponding classes used to handle writing of those file types.

PyREx

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

Navigation