load_from_id

specatalog.data_management.hdf5_reader.load_from_id(ms_id, mode='r')[source]

Load a hdf5-measurement-file from the archive as a H5Object.

Parameters:
  • ms_id (int) – Number of the measurement.

  • mode (str, optional) – Decides whether the file should be writable. If mode=”r” no changes can be done to the file. If mode=”a”, the file is also writable. The default is “r”.

Raises:

ValueError – An error is raised if no measurement with the given ID can be found in the archive.

Returns:

  • obj (H5Object) – The contents of the hdf5-file as a H5Object.

  • f (h5py.File) – The loaded hdf5-file. Use f.close() after all changes to the file are done.

Return type:

(<class ‘specatalog.data_management.hdf5_reader.H5Object’>, <class ‘h5py._hl.files.File’>)