Reading MATLAB Structs
CryoGrid-pyTools provides functionality to read MATLAB struct files into Python. Here's how to work with MATLAB data.
Important Note
Warning
The run_info.mat
file cannot be read directly as it contains special classes not supported by scipy.io.loadmat
. You'll need to save the required data in a different format from MATLAB.
Preparing MATLAB Data
When working in MATLAB, ensure you:
- Add the
CryoGrid/source
directory to the MATLAB path before saving files - Save data in a compatible format
For example, to save parts of run_info
, use this MATLAB code:
Reading MATLAB Files in Python
Once you have your MATLAB data in a compatible format:
The data will be converted to appropriate Python data structures, making it easy to work with in your Python environment.