load_h5

specatalog.data_management.hdf5_reader.load_h5(filename, mode='r')[source]

Loads an HDF5 file and returns it as an H5Object along with the underlying h5py.File.

Parameters:
  • filename (str) – Path to the HDF5 file.

  • mode (Literal["r", "a", "w"], optional) – File access mode: - “r”: Read-only (default) - “a”: Append to existing file - “w”: Overwrite existing file

Yields:

tuple[H5Object, h5py.File] – The H5Object wrapper and the raw h5py.File object.

Return type:

tuple[H5Object, File]