Repository navigation
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.