class documentation

class MagnetiCalc_Data(MutableMapping):

Constructor: MagnetiCalc_Data(data)

View In Hierarchy

MagnetiCalc_Data class.

Method __delitem__ Undocumented
Method __getitem__ Undocumented
Method __init__ Initializes MagnetiCalc_Data class.
Method __iter__ Undocumented
Method __len__ Undocumented
Method __setitem__ Undocumented
Method get_a_field Gets the A-field components as three separate 1D arrays (raveled). Please refer to get_field() for possible arguments.
Method get_a_field_list Gets the A-field components as a single list of 3D points (raveled). Please refer to get_field() for possible arguments.
Method get_axes Gets the sampling volume axes as three separate 1D arrays (raveled).
Method get_axes_list Gets the sampling volume axes as a single list of 3D points (raveled).
Method get_b_field Gets the B-field components. Please refer to get_field() for possible arguments.
Method get_b_field_list Gets the B-field components as a single list of 3D points (raveled). Please refer to get_field() for possible arguments.
Method get_current Gets the wire current.
Method get_dimension Gets the sampling volume dimension.
Method get_field Gets the field as three separate 1D arrays (raveled).
Method get_wire Gets the wire points as three separate 1D arrays (raveled).
Method get_wire_list Gets the wire points as a single list of 3D points (raveled).
Instance Variable dictionary Undocumented
Method _get_fields Gets the raw "fields" dictionary from the data.
Method _keytransform Undocumented
def __delitem__(self, key):

Undocumented

def __getitem__(self, key):

Undocumented

def __init__(self, data: dict):

Initializes MagnetiCalc_Data class.

This object can be accessed like a dictionary to get the data from an HDF5 export.

Moreover, it provides convenience functions for accessing reshaped or transformed copies of this data.

Parameters
data:dictDictionary
def __iter__(self):

Undocumented

def __len__(self):

Undocumented

def __setitem__(self, key, value):

Undocumented

def get_a_field(self, **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray]:

Gets the A-field components as three separate 1D arrays (raveled). Please refer to get_field() for possible arguments.

Returns
tuple[np.ndarray, np.ndarray, np.ndarray]A_x, A_y, A_z
def get_a_field_list(self, **kwargs) -> list:

Gets the A-field components as a single list of 3D points (raveled). Please refer to get_field() for possible arguments.

Returns
listList
def get_axes(self, reduce: bool = False) -> tuple[np.ndarray, np.ndarray, np.ndarray]:

Gets the sampling volume axes as three separate 1D arrays (raveled).

Parameters
reduce:boolEnable to reduce each raveled array to its minimal representation (axis ticks)
Returns
tuple[np.ndarray, np.ndarray, np.ndarray]x, y, z
def get_axes_list(self, **kwargs) -> list:

Gets the sampling volume axes as a single list of 3D points (raveled).

Returns
listList
def get_b_field(self, **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray]:

Gets the B-field components. Please refer to get_field() for possible arguments.

Returns
tuple[np.ndarray, np.ndarray, np.ndarray]B_x, B_y, B_z
def get_b_field_list(self, **kwargs) -> list:

Gets the B-field components as a single list of 3D points (raveled). Please refer to get_field() for possible arguments.

Returns
listList
def get_current(self) -> float:

Gets the wire current.

def get_dimension(self) -> tuple[int, int, int]:

Gets the sampling volume dimension.

Returns
tuple[int, int, int]nx, ny, nz
def get_field(self, field_type: str, as_3d: bool = False) -> tuple[np.ndarray, np.ndarray, np.ndarray]:

Gets the field as three separate 1D arrays (raveled).

Parameters
field_type:strField type ("A" or "B")
as_3d:boolEnable to transform each raveled 1D array into an unraveled 3D mesh (indexed by the minimal axes)
Returns
tuple[np.ndarray, np.ndarray, np.ndarray]Undocumented
def get_wire(self) -> tuple[np.ndarray, np.ndarray, np.ndarray]:

Gets the wire points as three separate 1D arrays (raveled).

Returns
tuple[np.ndarray, np.ndarray, np.ndarray]x, y, z
def get_wire_list(self) -> list:

Gets the wire points as a single list of 3D points (raveled).

Returns
listList
dictionary: dict =

Undocumented

def _get_fields(self) -> dict:

Gets the raw "fields" dictionary from the data.

Returns
dictDictionary
def _keytransform(self, key):

Undocumented