chaosmagpy.data_utils.load_matfile¶
- chaosmagpy.data_utils.load_matfile(filepath, variable_names=None, **kwargs)[source]¶
Load MAT-file and return dictionary.
Function loads MAT-file by traversing the structure converting data into low-level numpy arrays of different types. There is no guarantee that any kind of data is read in correctly. The data dtype can also vary depending on the MAT-file (v7.3 returns floats instead of integers). But it should work identically for v7.3 and prior MAT-files. Arrays are squeezed if possible. Relies on the
hdf5storage
package.- Parameters:
- filepathstr
Filepath and name of MAT-file.
- variable_nameslist of strings
Top-level variables to be loaded.
- **kwargskeywords
Additional keyword arguments are passed to
hdf5storage.loadmat()
.
- Returns:
- datadict
Dictionary containing the data as dictionaries or numpy arrays.