- class MAT¶
MAT files are a format used by Matlab
The ‘mat’ file must contain data formatted as follows:
The file can contain either or both pore and throat data.
2. The property names should be in the format of
throat_surface_area. In OpenPNM the first ‘_’ will be replaced by a ‘.’ to give
3. Boolean data represented as 1’s and 0’s will be converted to the Python boolean True and False. These will become 'labels' in OpenPNM.
- classmethod export_data(network, phases=, filename='')¶
Write Network to a Mat file for exporting to Matlab.
network (OpenPNM Network Object) –
filename (string) – Desired file name, defaults to network name if not given
phases (list of phase objects ()) – Phases that have properties we want to write to file
- classmethod import_data(filename, project=None)¶
Loads data from an appropriately formatted ‘mat’ file (i.e. MatLAB output).
filename (string (optional)) – The name of the file containing the data to import. The formatting of this file is outlined below.
project (OpenPNM Project object) – A GenericNetwork is created and added to the specified Project. If no Project object is supplied then one will be created and returned.
- Return type
If no project object is supplied then one will be created and returned.