freegs.critical.core_mask

Contents

freegs.critical.core_mask#

freegs.critical.core_mask(R, Z, psi, opoint, xpoint=[], psi_bndry=None)[source]#

Mark the parts of the domain which are in the core

Inputs#

R[nx,ny]:

2D array of major radius (R) values

Z[nx,ny]:

2D array of height (Z) values

psi[nx,ny]:

2D array of poloidal flux

opoint, xpoint :

Values returned by find_critical

If psi_bndry is not None, then that is used to find the separatrix, not the X-points.

returns:

A 2D array [nx,ny] which is 1 inside the core, 0 outside

rtype:

numpy.ndarray