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
HDF5DataProxyclass 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
configdict — The configuration dictionary.
Attributes
available_fields list[str]
available_fields list[str]The receiver fields contained in the HDF5 file.
contents dict
contents dictThe contents of the file as a dictionary.
Methods
compute_hash()
compute_hash()def compute_hash(self) -> str: ...Compute a hash to uniquely identify the data proxy.
Returns str
get_data()
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_namestr — The event name.receiver_fieldstr — The receiver field to retrieve.
Returns xr.Dataset
write_h5()
write_h5()def write_h5(self, filename: str | pathlib.Path) -> None: ...Write the contents to an HDF5 file.
Parameters
filenamestr | pathlib.Path — Path to write to.
Returns None