-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathREADME
25 lines (18 loc) · 897 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
convert_matlab73_hdf5
=====================
Convert Matlab v7.3 '.mat' files (i.e. HDF5 file format) into Python's
pickle/numpy format. This recent Matlab file format is unsupported by
SciPy's scipy.io.loadmat function. See notes here:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.io.loadmat.html
This script opens the Matlab file in HDF5 format, recursively navigate
the hierarchical structers and follows the pointers till final data,
usually in the form of numbers, arrays and strings. Once a leaf is
reached it heuristically converts the data as Python data types and
put them in a (Python) dictionary following the HDF5 semantic
structure.
This code works well for MEG (magnetoencephalography) files saved from
recent Matlab versions. For examples those you can find some of them
here:
ftp://ftp.fcdonders.nl/pub/biomag2012/
USAGE
python mat73_to_pickle.py <filename.mat>