gvec.plotting.plots2d#
- gvec.plotting.plots2d.plot_fourier_on_surface(state: State, quantity: str = 'mod_B', rho: float = 1.0, ntheta: int = 101, nzeta: int = 101, sfl: Literal['pest', 'boozer'] | None = None, limit: float | None = 1e-15, plot_kwargs: dict[str] = {}, **boozer_kwargs)#
Diagnostic plot for plotting the Fourier modes of a given quantitity on a flux surface.
- Parameters:
state (GVEC state object)
quantities (str, optional) – Quantitiy to plot. Default
mod_Brho (float, optional) – The flux surface label(s) to plot. Default is
1.0.ntheta (int, optional) – Resolution in
theta. Default is101nzeta (int, optional) – Resolution in
zeta. Default is101sfl (str, optional) – Plot surfaces in
"boozer","pest"or regular \(\theta-\zeta\) (None) coordinates. Default is"boozer"limit (float, optional) – Cut-off value for the Fourier amplitudes to plot. Default is
1e-15plot_kwargs (dict, optional) – Any
**kwargsto send to theplt.figure()function. For exampleplot_kwargs={'figsize': (8,8)}. See the matplotlib documentation for a list of kwargs.boozer_kwargs (optional) – Additional keyword arguments to pass to the
get_boozermethod of thestateobject. These can be used to specify the Boozer transform parameters. For example the maximum mode number factorboozer_kwargs={'MNfactor': 3}.
- Return type:
matplotlib.pyplot.figureobject andnumpy.ndarrayofmatplotlib.axis._axis.Axesobject(s).
- gvec.plotting.plots2d.plot_on_flux_surface(state: State, quantities: str | list[str] = 'mod_B', rho: float | ndarray | list = 1.0, ntheta: int = 51, nzeta: int = 51, subplot_grid: list[int] | None = None, share_axis: bool = True, share_contours: bool = False, levels: int | ndarray | list = 10, sfl: Literal['pest', 'boozer'] | None = 'boozer', style: Literal['contour', 'filled-contour'] = 'contour', plot_kwargs: dict = {}, **boozer_kwargs)#
Plot an equilibrium quantity over the two angles \((\vartheta, \zeta)\) of a flux surface at (a) given
rhovalue(s). Alternatively, plot multiplequantitieson a singlerhosurface.- Parameters:
state (GVEC state object)
quantities (str, list[str], optional) – Plot either a single quantitiy on a number of rho surfaces or a number of quantities on a single rho surface. Default
mod_Brho (float, numpy.ndarray, list, optional) – The flux surface label(s) to plot. Default is
1.0.ntheta (int) – Resolution in
theta. Default is11nzeta (int) – Resolution in
zeta. Default is 11subplot_grid (list[int], optional) – The grid shape for the subplots. If
None, grid will be automatically determined. Default isNone.share_axis (bool, optional) – If
True, all subplots will share theirxandyaxes. DefaultTrue.levels (int, numpy.ndarray, optional) – If
intthen chooses number of levels in the contour plot. If annumpy.ndarrayorlistthen plots contours at given values. Default is10sfl (str, optional) – Plot surfaces in
"boozer","pest"or regular \((\theta,\zeta)\) ("None") coordinates. Default is"boozer"style (str, optional) – Use
"contour"(False) or"filled-contour"(True) in plotting. Default is"filled-contour"(filled contour).plot_kwargs (dict, optional) –
Any
**kwargsto send to theplt.figure()function. For exampleplot_kwargs={'figsize': (8,8)}. See the matplotlib documentation for a list of kwargs.boozer_kwargs (optional) – Additional keyword arguments to pass to the
get_boozermethod of thestateobject. These can be used to specify the Boozer transform parameters. For example the maximum mode number factorboozer_kwargs={'MNfactor': 3}.
- Return type:
matplotlib.pyplot.figureobject andnumpy.ndarrayofmatplotlib.axis._axis.Axesobject(s).
- gvec.plotting.plots2d.plot_poloidal_plane(state: State, quantity: None | str = 'mod_B', nrho: int = 21, ntheta: int = 51, zeta: int | float | ndarray | list[float] = 9, subplot_grid: list[int] | None = None, share_axis: bool = False, rho_contours: int = 4, rho_contours_color: str | None = None, theta_contours: int = 8, theta_contours_color: str | None = None, sfl: Literal['pest'] | None = 'pest', plot_kwargs: dict = {})#
Plot a poloidal plane with some equilibrium quantity on it. Defaults to plotting \(|B|\)
- Parameters:
state (GVEC state object)
quantity (str, optional) – The quantity to plot. Default is
"mod_B". IfNone, no contours are plotted.nrho (int, optional) – The radial resolution of the slices. Default is
51ntheta (int, optional) – The poloidal resolution of the slices. Default is
51zeta (int, float, ndarray, optional) – The number of equally spaced slices (
int), the specificzetavalue (float) or values (np.ndarray). Default is9.subplot_grid (list[int], None, optional) – The grid shape for the subplots. If
None, grid will be automatically determined. Default isNone.share_axis (bool) – If
True, all subplots will share theirX1andX2axis positions. DefaultFalserho_contours (int, optional) – The number of
rhocontours to plot. If0, no contours are plotted. Default4rho_contours_color (str, optional) – The color of the
rhocontours. Default"white"theta_contours (int, optional) – The number of
thetacontours to plot. If0, no contours are plotted. Default8theta_contours_color (str, optional) – The color of the
thetacontours. Default"white"sfl (
"pest"orNone, optional) – Plot thethetacontours orpestcontours (\(\theta^\star\)). Default"pest".plot_kwargs (dict, optional) –
Any
**kwargsto send to theplt.figure()function. For exampleplot_kwargs={'figsize': (8,8)}. See the matplotlib documentation for a list of kwargs.
- Return type:
matplotlib.pyplot.figureobject andnumpy.ndarrayofmatplotlib.axis._axis.Axesobject(s).