cherab.imas.ids.equilibrium.load_magnetic_field_dataΒΆ

cherab.imas.ids.equilibrium.load_magnetic_field_data(profiles_2d: IDSStructArray) dictSourceΒΆ

Load 2D profiles of the magnetic field components from equilibrium IDS.

The magnetic field components are extracted from the profiles_2d IDS structure, assuming that the profiles are defined on a rectangular grid.

Parameters:
profiles_2d: IDSStructArrayΒΆ

The profiles_2d structure of the equilibrium IDS.

Returns:

r:

(N,) ndarray with R coordinates of rectangular grid.

z:

(M,) ndarray with Z coordinates of rectangular grid.

b_field_r:

(N, M) ndarray with R component of the magnetic field.

b_field_z:

(N, M) ndarray with Z component of the magnetic field.

b_field_phi:

(N, M) ndarray with toroidal component of the magnetic field.

Return type:

Dictionary with the following keys

Raises:

RuntimeError – If unable to read the magnetic field due to unsupported grid type or mismatched array shapes.