Repository navigation
Releases: max-models/plasma-plots
Release list
plasma-plots 0.2.5
plasma-plots 0.2.5
Features
- Point sets:
plasma_plots.pyvista_plots.pyvista_points(points, ...)draws labelled point
sets, such as samples, grid nodes or crossings:(n, 3)or component-major(3, n)arrays
((n, 2)in thez = 0plane), a list of them or a dict by label. Each set gets a color from
Matplotlib's cycle and a legend entry;vectors=adds an arrow at every point, e.g. normals,
scaled byvector_scale, andscalars=colors the points by a value. - One legend per scene:
pyvista_surfacesandpyvista_pointsdrawn into the same
plotter=continue one color cycle and share one legend that lists every labelled surface
and point set.
Documentation
- The 3-D views guide has a "Points and normals" subsection with an interactive scene.
- Per-level isosurface colors and opacity:
plot.isosurface(andpyvista_isosurface)
takesopacityand the newcolorsas one value or a list with one per level, e.g. an opaque
surface inside a translucent shell. Explicit colors replace the scalar bar with a legend of
the levels, named by the newlabels. For 2-D fields they apply to the contour lines.
plasma-plots 0.2.3
plasma-plots 0.2.3
Features
New modules in plasma_plots.theory, plain numpy and in SI units like theory.parameters:
sheaths: Bohm speed and current, floating potential (with secondary emission),
Child–Langmuir space-charge-limited flow (with injection speed), Langmuir–Blodgett flow between
coaxial cylinders and concentric spheres, Child–Langmuir and matrix sheath widths, OML probe
currents, ambipolar and Bohm diffusion, Paschen breakdown and mean free paths.beams: perveance, the Child–Langmuir current through an aperture, K-V rms envelopes (closed
form in a drift, RK4 with space charge and focusing), thermal beam divergence, the Pierce angle,
the Davisson–Calbick aperture lens, beam attenuation and stripping, space-charge compensation
time, andemittance_growth_space_charge.magnetron: the Hull cutoff of planar and coaxial gaps, Brillouin flow, Hall parameter,
critical ionisation velocity, E×B speed, the Simon–Hoh and gradient-drift modes, and
lower_hybrid_drift.collisions: the NRL Coulomb logarithm and collision frequencies, Spitzer resistivity, the
Spitzer and Stix slowing down of a fast ion, its critical energy and stopping, the pitch-angle
evolution of a slowing-down ion, and the shielded beam-driven current.negative_ions: cross sections and Maxwellian rate coefficients for the destruction of H⁻
(electron detachment, mutual neutralization, collisions with H and H₂), the Debye length and Bohm
speed of an electronegative plasma, H⁻ survival through a gas layer and surface-production
current.equilibria: the Harris current sheet, the Bennett pinch, Solov'ev tokamak equilibria
(Cerfon–Freidberg shapes), Lundquist force-free fields and the Taylor state. Each is checked
against its own force balance.kinetic.electron_cyclotron_drift: the electron cyclotron drift (modified two-stream)
dispersion relation for electrons drifting across B, as branches.special.bessel_j: Bessel functions of integer order in plain numpy.
Documentation
- The theory guide has figures for the sheath, beam, magnetron and collision modules.
- The new Gallery shows example scripts and the figures they make, including Child–Langmuir
against Langmuir–Blodgett, Paschen curves, K-V envelopes, fast-ion slowing down, the Hull cutoff
and gradient-drift growth.
plasma-plots 0.2.2
plasma-plots 0.2.2
Features
- Convergence fits on the asymptotic range:
plot_convergenceand
array.plasma.plot.convergence(...)takelast=n, which fits the order to the lastn
samples only, or, withorder, draws the reference slope through the last sample over the
lastnsamples. Use it when the coarse resolutions are not yet asymptotic. - Profiles by category, on log axes:
array.plasma.plot.profiles(...)takeslogx,logy
andcmap, and plots a categorical dimension (e.g. species) as one distinctly coloured line
per category, in both the Matplotlib and Plotly backends. Dimensionless profiles are labeled
without a unit.
Documentation
- The docs use the shared starlight-theme
(v0.3.1).
plasma-plots 0.2.1
plasma-plots 0.2.1
Features
- Rank boundaries on lineouts:
plot_lineoutandarray.plasma.plot.lineout(...)take
rank_boundaries(a sequence of coordinate values) andrank_boundary_color(default red),
drawing dashed vertical lines the same wayplot_slice'soverlays={"rank_boundaries": ...}
already did, so a 1-D profile of data split by mpiarray
can mark its rank boundaries too. overlays={"rank_boundaries": ...}takes an mpiarrayLayoutdirectly, onplot_slice,
plot_panels,InteractiveSliceViewer,animate_slicesandsave_frames: its axis for each
drawn dimension is found by name among the plotted array's own dimensions (the sweep
dimension excluded), so the layout needs no dimension names of its own and
Layout.boundary_valuesno longer has to be called by hand. A plain{name: values}dict
still works as before.
plasma-plots 0.1.1
plasma-plots 0.1.1
Features
- New
backend="tikz": every still plot can be drawn as TikZ/pgfplots code with LaTeX
text, converted by maxplotlib. Save the
result as.tikz,.texor.pdf(compiled withpdflatex); see the
LaTeX figures guide. plasma-plots plotandquicklookpickbackend="tikz"for a.texor.tikz
output. Animations and Plotly figures have no TikZ version and are reported as errors.
Installation and optional dependencies
Requires Python 3.10+ (was 3.11+); CI covers Python 3.10 to 3.14.
| New extra | Purpose |
|---|---|
tikz |
TikZ/pgfplots figures via maxplotlibx>=0.2.0 (and pdflatex to compile) |
tikz cannot yet be installed together with profiling or gallery:
scope-profiler pins maxplotlibx==0.1.9.
plasma-plots 0.1.0
plasma-plots 0.1.0
First public release. This is an experimental alpha: APIs and command-line
options may change as the package matures.
Features
- Plot labeled xarray DataArrays and Datasets using
.plasma.plot, with
time series, lineouts, slices, panels, vector fields, spectra and particle orbits. - Analyze growth/damping rates, frequencies, spectra, moments and spatial averages.
- Integrate with Struphy
Outputthroughout.plotandout.analysis, including
energy diagnostics, equilibrium plots and explicitly requested profiling plots. - Save Matplotlib figures and animations, display interactive slider viewers,
use Plotly browser figures, and render optional PyVista 3-D scenes. - Use
plasma-plots info,plot,movieandquicklookfrom the shell.
--showdisplays without requiring-o; use both to display and save.
Quicklook supports--productsand--selectand excludes expensive Gantt charts. - Automatically post-process Struphy runs when needed and reuse existing products.
- Inspect method signatures and examples with
plasma-plots help METHODor
plasma-plots plot PATH PRODUCT METHOD --help, without processing data. - Convert GVEC and DESC equilibria into the package's xarray conventions.
Installation and optional dependencies
Requires Python 3.11+; CI covers Python 3.11 and 3.12.
pip install plasma-plots
pip install "plasma-plots[netcdf]"
pip install "plasma-plots[netcdf,plotly]"The base package needs Matplotlib, NumPy, xarray and ipywidgets.
| Extra | Purpose |
|---|---|
netcdf |
netCDF3/netCDF4 input via netCDF4 |
plotly |
Interactive Plotly figures and Kaleido static exports |
pyvista |
PyVista 3-D rendering and imageio |
profiling |
Profiling plots via scope-profiler[pproc] |
desc |
DESC equilibrium evaluation via desc-opt |
gallery |
Plotly/Kaleido and scope-profiler gallery exports |
dev |
pytest, Ruff, h5py and griffe tooling |
Install Struphy, GVEC or Zarr separately when using those integrations.
MP4 export needs ffmpeg; GUI rendering needs a working display/backend;
Kaleido static exports need compatible Chrome.
Struphy compatibility
Validated against Struphy commit
caddd229a3fcba1fada577d1af46d012e93d8b49,
which reports version 3.3.0 and is pinned as this repository's submodule.
Use this exact revision to reproduce the tested integration. This is not a
claim of compatibility with every package or revision named 3.3.0.
Struphy is not required to plot ordinary xarray data.
Known limits
- The API is experimental; no long-term compatibility promise is made for 0.1.0.
- Complex derived data, custom Python callbacks and composed figures still belong
in Python scripts. - Optional renderers and file backends must be installed separately using the
extras above; the base package does not install the complete scientific stack.