Plotting functions¶
dexter.plot_particle_poloidal_drift(particle: Particle, equilibrium: Equilibrium, *, flux_span: tuple[float, float] = (0, 1), levels: int = 30, density: int = 200, locator: Locator = 'MaxN', show: bool = True) -> Canvas
¶
Creates a contour plot of the energy, calculated on a \((\psi/\psi_p, \theta)\) grid.
Parameters:
-
particle(Particle) –The Particle.
-
equilibrium(Equilibrium) –The equilibrium in which the particle was integrated.
Other Parameters:
-
flux_span(tuple[float, float]) –The \(\psi/\psi_p\) span in which to calculate the energy contours, with respect to \(\psi_{wall}/\psi_{p,wall}\). Defaults to (0, 1).
-
levels(int) –The number of energy levels on the contour. Defaults to 30.
-
density(int) –The energy contour grid density. Defaults to 200
-
show(bool) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.
dexter.plot_parabolas(equilibrium: Equilibrium, mu: float, particles: list[Particle] | None = None, xlim: tuple[float, float] = (-1.6, 0.5), ymax: float = 3, density: int = 1000, show: bool = True) -> Canvas
¶
Plots the orbit classification parabolas on the \((E, P_\zeta, \mu=const)\) space.
Parameters:
-
equilibrium(Equilibrium) –The equilibrium in which to construct the COM space.
-
mu(float) –The magnetic moment \(\mu\).
Other Parameters:
-
particles(list[Particle] | None) –A list of particles to project on the E-Pζ plane.
-
xlim(tuple[float, float]) –The xaxis limits, normalized to \(\psi_{p,wall}\). Defaults to (-1.6, 0.5).
-
ymax(float) –The yaxis upper limit. If not provided, the axes are autoscaled by the parabolas. Note that by definition, the minimum of the magnetic axis parabola is always the point \((0, 1)\). Defaults to 3.
-
density(int) –The number of points to evaluate each parabola on. Defaults to 1000.
-
show(bool) –Whether or not to call
plt.show(). Defaults to True.
Returns:
-
Canvas–The produced
FigureandAx.