Skip to content

Releases: max-models/plasma-plots

plasma-plots 0.2.5

Choose a tag to compare

@github-actions github-actions released this 22 Oct 12:22
c99d7c5

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 the z = 0 plane), 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 by vector_scale, and scalars= colors the points by a value.
  • One legend per scene: pyvista_surfaces and pyvista_points drawn 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 (and pyvista_isosurface)
    takes opacity and the new colors as 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 new labels. For 2-D fields they apply to the contour lines.

Documentation

plasma-plots 0.2.3

Choose a tag to compare

@github-actions github-actions released this 20 Oct 12:02
371e681

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, and emittance_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.

Documentation

plasma-plots 0.2.2

Choose a tag to compare

@github-actions github-actions released this 17 Oct 20:52
3716d99

plasma-plots 0.2.2

Features

  • Convergence fits on the asymptotic range: plot_convergence and
    array.plasma.plot.convergence(...) take last=n, which fits the order to the last n
    samples only, or, with order, draws the reference slope through the last sample over the
    last n samples. Use it when the coarse resolutions are not yet asymptotic.
  • Profiles by category, on log axes: array.plasma.plot.profiles(...) takes logx, logy
    and cmap, 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

Documentation

plasma-plots 0.2.1

Choose a tag to compare

@github-actions github-actions released this 11 Oct 15:27
3bba23f

plasma-plots 0.2.1

Features

  • Rank boundaries on lineouts: plot_lineout and array.plasma.plot.lineout(...) take
    rank_boundaries (a sequence of coordinate values) and rank_boundary_color (default red),
    drawing dashed vertical lines the same way plot_slice's overlays={"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 mpiarray Layout directly, on plot_slice,
    plot_panels, InteractiveSliceViewer, animate_slices and save_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_values no longer has to be called by hand. A plain {name: values} dict
    still works as before.

Documentation

plasma-plots 0.1.1

Choose a tag to compare

@github-actions github-actions released this 02 Oct 08:47
25f5870

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, .tex or .pdf (compiled with pdflatex); see the
    LaTeX figures guide.
  • plasma-plots plot and quicklook pick backend="tikz" for a .tex or .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.

Documentation

plasma-plots 0.1.0

Choose a tag to compare

@max-models max-models released this 30 Sep 18:36
afd925a

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 Output through out.plot and out.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, movie and quicklook from the shell.
    --show displays without requiring -o; use both to display and save.
    Quicklook supports --products and --select and excludes expensive Gantt charts.
  • Automatically post-process Struphy runs when needed and reuse existing products.
  • Inspect method signatures and examples with plasma-plots help METHOD or
    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.

Documentation