Skip to main content

pyRUMP

PyPI License: MIT

Measured spectrum compared against a pyRUMP simulation, showing a Si / Ru / Mn2.74Pt1 / Ru stack Measured data (black) vs. a pyRUMP simulation (red) of a Si / Ru / Mn2.74Pt1 / Ru stack.

A clean Python reimplementation of RUMP, the Rutherford backscattering spectrometry (RBS) simulation and analysis package originally written by L. R. Doolittle and M. O. Thompson at Cornell.

The original is ~22k lines of unmaintained C from the late 1980s, with no active support. This reimplementation is written using Claude Code and reproduces RUMP's physics as a tested, importable Python library, with both a batch CLI and RUMP's own interactive shell. It runs on Windows, macOS, and Linux.

Rewriting from scratch with AI assistance is also a chance to move past a straight port: a handful of bugs in the original C are fixed rather than just reproduced (validated against the C oracle — see RUMP quirks and defects), new physics has been added (Andersen screening alongside RUMP's own L'Ecuyer correction, via SCREENING), and the workflow is gaining commands RUMP never had, like automatic per-fit REPORT generation. SIMNRA's .xnra files can be read and written, spectrum, instrument settings and sample together, with GETNRA/WRITENRA; NDF support is planned.

Quick start

pip install pyrump

Requires Python 3.10+; 3.14 is recommended, and is what pyRUMP is tested on. numpy, scipy, and matplotlib are installed automatically, along with the physics data tables pyRUMP needs at runtime.

pyrump                         # the interactive shell, from any directory
Your wish? cd examples
Your wish? xeq MnPt.RBS         /* load the measured spectrum, above    */
Your wish? sim get MnPt.lcm     /* load its 5-layer sample description  */
Your wish? compare              /* data vs. simulation, with residuals  */

Buffer 0 is always the simulation and recomputes itself when the sample or the active buffer's parameters change — there is no "simulate" command, exactly as in the original.

Or drive it as one-off batch commands:

pyrump simulate sample.lcm --energy 2.0 --beam 4He -o out.rbs
pyrump fit sample.lcm measured.rbs --vary thickness:0 --window 190 226
pyrump plot measured.rbs --compare out.rbs -o comparison.png
pyrump convert measured.rbs measured.dat

Documentation

The full manual — interactive shell reference, CLI and Python API, worked examples, the physics writeup, and the list of RUMP quirks and defects found while porting — is at https://ikost.github.io/pyRUMP/.

Contributing

pip install -e ".[dev]"
pytest              # unit tests, no external dependencies
ruff check .

Oracle-comparison tests (pytest -m oracle) need the RUMP C source, which isn't redistributed here — see Design and validation. They skip cleanly when it's absent, so it's not needed for everyday development.

Licensing and provenance

pyRUMP is MIT licensed, and an independent reimplementation: it is not affiliated with, endorsed by, or derived from the RUMP source distribution. See Licensing and provenance for the full story, including bundled data-table provenance.

Metadata

Release files for pyrump 1.5.3

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

Source distribution (sdist)

Source distribution for pyrump 1.5.3
File Size Uploaded Provenance Actions
pyrump-1.5.3.tar.gz 206.5 kB Without provenance Details for pyrump-1.5.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrump 1.5.3
File Interpreter ABI Platform Actions
pyrump-1.5.3-py3-none-any.whl Python 3 none any Details for pyrump-1.5.3-py3-none-any.whl

Total release size: 441.1 kB

Release files / pyrump-1.5.3.tar.gz

Download URL pyrump-1.5.3.tar.gz
Size 206.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d0196bd2440151eb72d91fd72036f8aec47608911cb9f6457a419f0349f576d8
BLAKE2b-256 checksum
How to use checksums
22e156f8f5a6734fa8db422e647f85f8c13ee43caa0bac647ee95f41a19bb7cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyrump-1.5.3-py3-none-any.whl

Download URL pyrump-1.5.3-py3-none-any.whl
Size 234.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9235a62d6b2de8d4cad5677b0e38ffc80b64c1763994d2a5b2dc2bad5369e45f
BLAKE2b-256 checksum
How to use checksums
816da7596868888cf18c42622101a6c271c3a471294cea3f5a9bef1959710336
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for pyrump 1.5.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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