freegs.control.ConstrainPsiNorm2D#
- class freegs.control.ConstrainPsiNorm2D(target_psinorm, weights=1.0)[source]#
Bases:
objectAdjusts coil currents to minimise the square differences between normalised psi[R,Z] and a target normalised psi.
- __init__(target_psinorm, weights=1.0)[source]#
- target_psinorm2D (R,Z) array
Must be the same size as the equilibrium psi
- weightsfloat or 2D array of same size as target_psinorm
Relative importance of each (R,Z) point in the fitting By default every point is equally weighted Set points to zero to ignore them in fitting.
Methods
__init__(target_psinorm[, weights])target_psinorm : 2D (R,Z) array
psinorm_difference(currents, eq)Difference between normalised psi from equilibrium with the given currents and the target psinorm