exosim.output.hdf5.utils#

Functions#

load_signal(input)

It loads the appropriate Signal class from an opened hdf5 file.

recursively_read_dict_contents(input_dict)

Will recursive read a dictionary, initializing quantities and table from a dictionary read from an hdf5 file.

copy_file(in_object, out_object)

Recursively copy an HDF5 tree structure from one file to another.

Module Contents#

load_signal(input)[source]#

It loads the appropriate Signal class from an opened hdf5 file.

Parameters:

input (h5py.File) – opened hdf5 file

Return type:

Signal

Raises:

IOError – if the loaded Dataset is a Cached Signal.

recursively_read_dict_contents(input_dict)[source]#

Will recursive read a dictionary, initializing quantities and table from a dictionary read from an hdf5 file.

Parameters:

input_dict (dict) – dictionary read from hdf5

Returns:

Dictionary we want to use

Return type:

dict

copy_file(in_object, out_object)[source]#

Recursively copy an HDF5 tree structure from one file to another.

This function traverses the hierarchy of the input HDF5 object (in_object) and replicates it in the output HDF5 object (out_object). It can copy both groups and datasets, and also replicates all attributes.

Parameters:
  • in_object (Union[h5py.Group, h5py.Dataset]) – The input HDF5 object (either root, a subgroup, or a dataset).

  • out_object (Union[h5py.Group, h5py.Dataset]) – The output HDF5 object (either root, a subgroup, or a dataset).

Raises:

ValueError – If an invalid object type is encountered.

Return type:

None