qem.io
Functions
|
Test whether a path exists. |
|
This function is used to read legacy StatSTEM input files in from .mat files. |
- qem.io.read_legacyInputStatSTEM(filename)[source]
This function is used to read legacy StatSTEM input files in from .mat files.
StatSTEM Input class objects from matlab must be converted to struct objects in matlab first. (e.g. StatSTEM_Input = struct(StatSTEM_Input))) This is intended to be a temporary solution until the new pyStatSTEM classes are implemented. :param filename: path to .mat file containing StatSTEM input data :type filename:
string
- Returns:
dict
– dictionary containing StatSTEM input data mirroring the legacy matlab class structure- Raises:
FileNotFoundError – Provided filename does not exist
Examples
>>> from pyStatSTEM.io import read_legacyInputStatSTEM >>> legacyData = read_legacyInputStatSTEM('Examples/Example_PtIr.mat') >>> inputStatSTEM = legacyData["input"] >>> plt.imshow(inputStatSTEM['obs'])