Mondaic

salvus.flow.collections.data_proxies.hdf5_data_proxy

salvus.flow.collections.data_proxies.hdf5_data_proxy salvus flow collections data_proxies hdf5_data_proxy

HDF5 data proxy.

Classes

HDF5DataProxy

class HDF5DataProxy(salvus.flow.collections.data_proxies.BaseDataProxy):
    def __init__(self, config: dict): ...

Helper class that provides a standard way to create an ABC using inheritance.

Init.

Parameters
  • config dict — The configuration dictionary.
Attributes
available_fields list[str]

The receiver fields contained in the HDF5 file.

contents dict

The contents of the file as a dictionary.

Methods
compute_hash()
def compute_hash(self) -> str: ...

Compute a hash to uniquely identify the data proxy.

Returns str
get_data()
def get_data(self, event_name: str, receiver_field: str) -> xr.Dataset: ...

Get data for one event/shot from the HDF5 data format.

Parameters
  • event_name str — The event name.
  • receiver_field str — The receiver field to retrieve.
Returns xr.Dataset
write_h5()
def write_h5(self, filename: str | pathlib.Path) -> None: ...

Write the contents to an HDF5 file.

Parameters
  • filename str | pathlib.Path — Path to write to.
Returns None