class documentation
class API:
API class.
Static Method | export |
Exports data to an HDF5 container. |
Static Method | export |
Exports wire points to a TXT file. |
Static Method | import |
Imports data from an HDF5 container. |
Static Method | import |
Imports wire points from a TXT file. |
Static Method | _dict |
Recursively transforms a dictionary into an HDF5 group (in-place). |
Static Method | _hdf5 |
Recursively transforms an HDF5 group into a dictionary (in-place). |
Exports data to an HDF5 container.
Takes a dictionary and writes an HDF5 file using keys as keys, and items as groups if they are dictionaries or as datasets otherwise.
Parameters | |
filename:str | Filename |
data:dict | MagnetiCalc_Data | Dictionary or MagnetiCalc_Data object |
Exports wire points to a TXT file.
Parameters | |
filename:str | Filename |
data:list | np.ndarray | NumPy array of 3D points |
Imports data from an HDF5 container.
Opens an HDF5 file and converts every group and subgroup into a dictionary where the keys are the group keys and the items are the datasets.
Parameters | |
filename:str | Filename |
Returns | |
MagnetiCalc_Data | MagnetiCalc_Data object (can be accessed like a dictionary) |
Imports wire points from a TXT file.
Parameters | |
filename:str | Filename |
Returns | |
np.ndarray | NumPy array of 3D points |
Recursively transforms a dictionary into an HDF5 group (in-place).
Parameters | |
hdf5h5py.Group | HDF5 group |
dictionary:dict | Dictionary |