Skip to main content

shape-plotters

Interactive matplotlib plotters for axially symmetric nuclear shapes. Move a slider and the shape, its derivative and its integral properties update. One shared engine draws the figure; each shape parameterization is a render module.

render parameterization sliders library
beta spherical-harmonic (Legendre) expansion β1–β8 beta-parameterization
fos Fourier-over-Spheroid c, a3–a8 fos-parameterization

The shapes are not re-implemented here. R(θ) and the analytic dR/dθ come from the compiled libraries, evaluated on a 2048-node Gauss-Legendre grid in cos θ. That is the dense grid of the WMMM macroscopic-microscopic energy model, so the plot shows exactly the shape the model evaluates.

What the figure shows

  • R(θ) and dR/dθ, and the cross-section ρ(z) with equal axes. The FoS render adds a ρ(z) panel with the library's dρ/dz.
  • Stats: volume, surface and centre of mass by Gauss-Legendre quadrature, the neck position, radius and depth, and the fragment volume and mass split at the neck.
  • Overlays (orange, dashed): for beta, the centre-of-mass corrected shape when its β1 differs from the slider value; for FoS, the R(θ) star-convex representation when its centre of mass is shifted.
  • Scission bands: the neck-radius range 1.2–1.5 fm, shaded.
  • Invalid shapes stay on screen, greyed, with the library's status as the panel title.

Controls: ± nudge buttons on every slider, an fm / R₀ unit toggle with Z and N boxes (R₀ = 1.16 A^(1/3) fm), Reset, and Save (300 dpi PNG named after the parameters, written to the current directory). Red dotted marks on the FoS sliders are practical limits.

While a slider is dragged the axes hold still, so the shape visibly changes instead of the axes rescaling around it; they refit when the mouse is released. If the shape outgrows the view mid-drag, the view jumps out once.

Requirements

  • Linux x86-64. The parameterization libraries ship manylinux wheels only; WSL2 with WSLg works.
  • Python 3.10 or newer with a matplotlib GUI backend. Tk is the default (python3-tk on Debian/Ubuntu).

Install

pip install shape-plotters

or pipx install shape-plotters to get the command without touching another environment. The parameterization libraries come along as prebuilt wheels (Fortran shared library and libgfortran bundled), pinned to the exact versions each render is written against.

Under WSL, keep the virtual environment on the Linux filesystem, not under /mnt/c. The Windows drive is a 9P mount; a venv there makes matplotlib rendering sluggish (~5× slower).

Run

shape-plotters beta
shape-plotters fos

python -m shape_plotters beta does the same.

Energy button

An Energy button appears when a Python package named wmmm is importable. It prints the WMMM energies of the shape on screen. WMMM is not public yet and is not a dependency: without it the button is absent and nothing else changes. This repository contains the calling convention only, no model code, data or output.

Development

git clone https://github.com/AleksanderAugustyn/shape-plotters.git
cd shape-plotters
python3 -m venv ~/.venvs/shape-plotters
source ~/.venvs/shape-plotters/bin/activate
pip install -e ".[test]"
python -m pytest

The WMMM smoke tests skip when wmmm is not installed. The frame-time budgets in tests/test_perf.py assume a venv on the Linux filesystem.

shape_plotters/cli.py          entry point and render registry
shape_plotters/core/           engine, widgets, quadrature, neck and fragment helpers
shape_plotters/core/result.py  the render contract (what a render gives the engine)
shape_plotters/renders/        one module per parameterization
tests/                         pytest suite, including frame-time budgets

A new parameterization is a new module in shape_plotters/renders/ that implements the render contract, plus one registry entry in cli.py and a pinned library in pyproject.toml. The engine needs no change.

Releases are cut by pushing a version tag such as 0.1.0; the wheels workflow builds, tests and publishes to PyPI.

License

MIT, see LICENSE. Changes are recorded in CHANGELOG.md.

Metadata

Release files for shape-plotters 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shape-plotters 0.2.0
File Size Uploaded Provenance Actions
shape_plotters-0.2.0.tar.gz 48.0 kB With provenance Details for shape_plotters-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shape-plotters 0.2.0
File Interpreter ABI Platform Actions
shape_plotters-0.2.0-py3-none-any.whl Python 3 none any Details for shape_plotters-0.2.0-py3-none-any.whl

Total release size: 77.8 kB

Release files / shape_plotters-0.2.0.tar.gz

Download URL shape_plotters-0.2.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8efff1d2c9b8cd2f1d5aba2ebedfaa260c0a03b385b5cb9d96115b287b7e191f
BLAKE2b-256 checksum
How to use checksums
bb4471c50ddeed3a9c928a2a27910aaad806cda2184647b96331885829d11770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / shape_plotters-0.2.0-py3-none-any.whl

Download URL shape_plotters-0.2.0-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48cbffc82f72de7c3c4e4d0a4a92bbacc79809371d6c3c0f84b9f430fd17dc84
BLAKE2b-256 checksum
How to use checksums
550f33e4f1d786de780d650a8e557406df1e3420b77720e4b5603365140c3342
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Security for shape-plotters 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for shape_plotters-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page