desc.magnetic_fields.DommaschkPotentialField.fit_magnetic_field
- classmethod DommaschkPotentialField.fit_magnetic_field(field, coords, max_m, max_l, sym=False, verbose=1, NFP=1)Source
Fit a vacuum magnetic field with a Dommaschk Potential field.
- Parameters:
ndarray) (field (MagneticField or callable or) –
- if callable, must accept (num_nodes,3) array of rpz coords as argument
and output (num_nodes,3) as the B field in cylindrical rpz basis.
- if ndarray, must be an ndarray of the magnetic field in rpz,
of shape (num_nodes,3) with the columns being (B_R, B_phi, B_Z)
(ndarray) (coords) –
(int) (verbose) – i.e. if NFP= 2 and max_m = 3, then modes with arguments up to 3*2*phi will be included
(int) –
(bool) (sym) – if True, only stellarator-symmetric modes will be included in the fitting
(int) – with field period NFP. This will only allow Dommaschk m modes that are integer multiples of NFP.
(int) –