slmsuite.holography.analysis.files.load_h5#

load_h5(file_path, decode_bytes=True)[source]#

Read data from an h5 file into a dictionary. In the case of more complicated h5 hierarchy, a dictionary of dictionaries is returned.

Parameters:
  • file_path (str) – Full path to the file to read the data from.

  • decode_bytes (bool) – Whether or not objects with type bytes should be decoded. By default HDF5 writes strings as bytes objects; this functionality will make strings read back from the file str type.

Returns:

data – Dictionary of the data stored in the file.

Return type:

dict