class API:
Static Method | export_hdf5 |
Exports data to an HDF5 container. |
Static Method | export_wire |
Exports wire points to a TXT file. |
Static Method | import_hdf5 |
Imports data from an HDF5 container. |
Static Method | import_wire |
Imports wire points from a TXT file. |
Static Method | _dict_to_hdf5_group |
Recursively transforms a dictionary into an HDF5 group (in-place). |
Static Method | _hdf5_group_to_dict |
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:Union[ | Dictionary or MagnetiCalc_Data object |
Parameters | |
filename:str | Filename |
data:Union[ | 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) |
Parameters | |
filename:str | Filename |
Returns | |
np.ndarray | NumPy array of 3D points |