freegs.critical.find_safety#
- freegs.critical.find_safety(eq, npsi=1, psinorm=None, ntheta=128, psi=None, opoint=None, xpoint=None, axis=None)[source]#
Find the safety factor for each value of psi Calculates equally spaced flux surfaces. Points on each flux surface are equally paced in poloidal angle Performs line integral around flux surface to get q
eq - The equilbrium object psinorm flux surface to calculate it for npsi - Number of flux surface values to find q for ntheta - Number of poloidal points to find it on
If opoint, xpoint or psi are not given, they are calculated from eq
returns safety factor for npsi points in normalised psi