Fast, streaming reader for MCNP RSSA (surface source) files, with a Rust core and a Polars-based Python API.
RSSA files record every particle that crosses a given surface during an MCNP (or
D1S-UNED) simulation, and can easily reach tens or hundreds of gigabytes. aci_rssa
memory-maps the file and decodes track records in parallel (via rayon),
handing the result to Python as a Polars DataFrame — either all at once, or as a lazy,
batch-at-a-time stream for files too large to fit in memory.
Installation
pip install aci_rssa
Prebuilt wheels are published for Linux, macOS, and Windows (x86_64/arm64) on CPython ≥3.10 — no Rust toolchain needed to install.
Quickstart
from aci_rssa import RSSA
rssa = RSSA.read_from_file("surface_source.w")
print(rssa) # summary: surfaces, track/history counts, source code
rssa.tracks # polars.DataFrame: history, particle_type, weight, energy,
# time, x, y, z, u, v, w, surface_id
rssa.neutron_tracks # tracks filtered to neutrons
rssa.photon_tracks # tracks filtered to everything else (typically photons)
Reading only the header (fast, never touches the potentially huge track data):
from aci_rssa import FileParameters
parameters = FileParameters.read_from_file("surface_source.w")
parameters.nrss # number of tracks recorded
parameters.surfaces # surfaces tracks were recorded on
Very large files
For files too large to load eagerly, scan_tracks returns a Polars LazyFrame backed
by a Rust reader that decodes the file batch by batch, driven by Polars' query engine —
filters and column selection are pushed down so you only decode what you need:
from aci_rssa import scan_tracks
import polars as pl
(
scan_tracks("surface_source.w")
.filter(pl.col("energy") > 1.0)
.select("x", "y", "z", "energy")
.collect(engine="streaming")
)
RSSAPlot and RSSASpectraPlot accept a LazyFrame directly, so a scan_tracks()
result can be plotted without ever loading the file eagerly — construct them by hand
instead of going through RSSA.read_from_file()/.plot_cyl()/.plot_plane(), which
require an in-memory RSSA:
from aci_rssa import FileParameters, RSSAPlot, scan_tracks
parameters = FileParameters.read_from_file("surface_source.w") # header only
plot = RSSAPlot(scan_tracks("surface_source.w"), parameters, x_col="x", y_col="y")
(
plot.set_particle("n")
.calculate_bins(bin_width=10)
.get_particle_current(1e17)
.show()
)
Plotting
rssa.plot_cyl(axis="z").show() # particle density on a cylindrical surface
rssa.plot_plane(x="x", y="y").show() # particle density on a planar surface
rssa.plot_spectra().show() # energy spectrum
Development
This is a Cargo workspace (rssa-core, the pure-Rust parsing/decoding library, and
rssa-python, its PyO3 bindings) plus a Python package in python/, built together
with maturin.
python -m venv .venv && source .venv/bin/activate
pip install "maturin>=1.9.4,<2.0"
maturin develop --extras test,dev # builds the extension module, installs test/dev deps
cargo test # Rust tests (rssa-core)
pytest # Python tests
ty check python/aci_rssa # type checking
License
Licensed under the European Union Public Licence v1.2 (EUPL-1.2).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aci_rssa-0.0.6.tar.gz.
File metadata
- Download URL: aci_rssa-0.0.6.tar.gz
- Upload date:
- Size: 59.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7f1031851b2eeea66a1193e6c6fae03901d0af2b62bfb9fdbe1dd10301e5ecf
|
|
| MD5 |
1a422ad296b2f7c3928474fc1875d076
|
|
| BLAKE2b-256 |
dda575bbf1b7d9f8b7ad6633a5a20879574dbbd9ff34ad80cec4e0f9521d97f8
|
Provenance
The following attestation bundles were made for aci_rssa-0.0.6.tar.gz:
Publisher:
release.yml on AlvaroCubi/aci_rssa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aci_rssa-0.0.6.tar.gz -
Subject digest:
a7f1031851b2eeea66a1193e6c6fae03901d0af2b62bfb9fdbe1dd10301e5ecf - Sigstore transparency entry: 2234294226
- Sigstore integration time:
-
Permalink:
AlvaroCubi/aci_rssa@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/AlvaroCubi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aci_rssa-0.0.6-cp310-abi3-win_arm64.whl.
File metadata
- Download URL: aci_rssa-0.0.6-cp310-abi3-win_arm64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.10+, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9d0a5a46ff70904ddc0b0cda1a830297fa98ac81a1ca0464dfc1964e03a816d
|
|
| MD5 |
60f159add012e0bf7f410769a51f8b86
|
|
| BLAKE2b-256 |
545935c5fa6cb0fa49e938b0227b35b8500c03a696f2be41000757b3917553fd
|
Provenance
The following attestation bundles were made for aci_rssa-0.0.6-cp310-abi3-win_arm64.whl:
Publisher:
release.yml on AlvaroCubi/aci_rssa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aci_rssa-0.0.6-cp310-abi3-win_arm64.whl -
Subject digest:
a9d0a5a46ff70904ddc0b0cda1a830297fa98ac81a1ca0464dfc1964e03a816d - Sigstore transparency entry: 2234295428
- Sigstore integration time:
-
Permalink:
AlvaroCubi/aci_rssa@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/AlvaroCubi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aci_rssa-0.0.6-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: aci_rssa-0.0.6-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
032b1532765808f463a26d9a33b46531745d91a93390688aa73754950d5259dc
|
|
| MD5 |
7078e0c2138d335a7a35b83bf6f5fbbb
|
|
| BLAKE2b-256 |
0494c1711193365e3f2963716121c6f8007e7dcdfb7d26a5db027a3f4743631a
|
Provenance
The following attestation bundles were made for aci_rssa-0.0.6-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on AlvaroCubi/aci_rssa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aci_rssa-0.0.6-cp310-abi3-win_amd64.whl -
Subject digest:
032b1532765808f463a26d9a33b46531745d91a93390688aa73754950d5259dc - Sigstore transparency entry: 2234295075
- Sigstore integration time:
-
Permalink:
AlvaroCubi/aci_rssa@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/AlvaroCubi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0136c22848d8610e9f760709604843fbb219a36444e56fce643b3b5b850641a5
|
|
| MD5 |
d8fb9c344aa4e9af6b4deace83d431d5
|
|
| BLAKE2b-256 |
5696049378ce3c275c5642eef918a7ac0603d8225e7a79131c10ec1f585dc303
|
Provenance
The following attestation bundles were made for aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on AlvaroCubi/aci_rssa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0136c22848d8610e9f760709604843fbb219a36444e56fce643b3b5b850641a5 - Sigstore transparency entry: 2234294884
- Sigstore integration time:
-
Permalink:
AlvaroCubi/aci_rssa@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/AlvaroCubi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
553baf752d711d244f2c781a261970ab201107b36f63ad0c1f5b77c65f372b1f
|
|
| MD5 |
69b27d5d0b358fa6dcad475fd325624c
|
|
| BLAKE2b-256 |
d65f973eb1e7566506c6d2bfb605627abc9a797783c3058b7787270e1eb46ff3
|
Provenance
The following attestation bundles were made for aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on AlvaroCubi/aci_rssa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aci_rssa-0.0.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
553baf752d711d244f2c781a261970ab201107b36f63ad0c1f5b77c65f372b1f - Sigstore transparency entry: 2234295631
- Sigstore integration time:
-
Permalink:
AlvaroCubi/aci_rssa@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/AlvaroCubi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aci_rssa-0.0.6-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: aci_rssa-0.0.6-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
749a40ad1057b3a71370bcb08b7fdec2ba41972a8694d45178b2b0079d0bb8f7
|
|
| MD5 |
b82854876fdccc5973cc2b4d4d664fc1
|
|
| BLAKE2b-256 |
45b75cc091c899aa1957b4b9d61839619c0a546a2afb505c457f4be6632cc0fb
|
Provenance
The following attestation bundles were made for aci_rssa-0.0.6-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on AlvaroCubi/aci_rssa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aci_rssa-0.0.6-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
749a40ad1057b3a71370bcb08b7fdec2ba41972a8694d45178b2b0079d0bb8f7 - Sigstore transparency entry: 2234295255
- Sigstore integration time:
-
Permalink:
AlvaroCubi/aci_rssa@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/AlvaroCubi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aci_rssa-0.0.6-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: aci_rssa-0.0.6-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 4.9 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2d1f75e69de0a7db3793cbb758ee50efa354c2f28de07b51d7e8440ca8273d3
|
|
| MD5 |
615f9f0160c3a72af453790c66b2c56d
|
|
| BLAKE2b-256 |
a7e9e4b62f340c120ec836313eece5653ef5589b7c9707629cccf46da4af9309
|
Provenance
The following attestation bundles were made for aci_rssa-0.0.6-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on AlvaroCubi/aci_rssa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aci_rssa-0.0.6-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
e2d1f75e69de0a7db3793cbb758ee50efa354c2f28de07b51d7e8440ca8273d3 - Sigstore transparency entry: 2234294529
- Sigstore integration time:
-
Permalink:
AlvaroCubi/aci_rssa@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/AlvaroCubi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d4215da9ef6e79e98ca0b77a74043521d9b6b148 -
Trigger Event:
push
-
Statement type: