fitscube-rs
Documentation: Python API, CLI, and algorithm background at fitscube-rs.readthedocs.io; Rust API at docs.rs/fitscube-rs.
A Rust port of the fitscube Python package. It stacks single-frequency or single-time FITS images into a cube, taking the frequency or time axis from the image headers and keeping per-channel beams in a CASA BEAMS table, and extracts planes back out of a cube.
Note: This is an experiment in LLM-assisted coding with Claude. Do not trust this software as far as you can throw it.
Installation
Python library
pip install fitscube-rs
CLI binary
Requires Rust 1.88+.
cargo install fitscube-rs
Usage
- Python API and quickstart: fitscube-rs.readthedocs.io/en/latest/quickstart.html
- CLI reference: fitscube-rs.readthedocs.io/en/latest/cli.html
- Rust API: docs.rs/fitscube-rs
Development
Install in editable mode:
uv pip install -e .
After changing the Python-facing Rust API in src/python.rs, rebuild with the
stubgen feature (the default build omits _generate_stubs) and regenerate
the type stubs:
uv run maturin develop --features stubgen
uv run --no-sync python -c "from fitscube_rs._fitscube_rs import _generate_stubs; _generate_stubs()"
This rewrites fitscube_rs/_fitscube_rs/__init__.pyi from the Rust signatures and docstrings. Commit it with the API change.
Running tests
Python tests need the compiled extension and the test extra, which
includes fitscube for the parity
tests. uv sync builds the extension into .venv; uvx pytest would run
without it.
uv sync --extra test --reinstall-package fitscube-rs # rebuild after Rust changes
uv run --no-sync pytest
Rust tests run with cargo test:
cargo test
Pre-commit hooks
prek runs the hooks in
.pre-commit-config.yaml, the same checks as CI: ruff, ty,
cargo fmt and cargo clippy.
uv sync --extra dev # installs prek + ty into the venv
uvx prek install # install the git hook (runs on every commit)
uvx prek run --all-files # run all hooks manually
License
fitscube-rs is released under the BSD 3-Clause License.
It is a port of the fitscube Python
package by Alec Thomson (BSD 3-Clause), and validates its output against that
package in the test suite. See
NOTICE.md
for full attributions.
Metadata
Release files for fitscube-rs 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fitscube_rs-2.0.0.tar.gz | 222.6 kB | With provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fitscube_rs-2.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| fitscube_rs-2.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| fitscube_rs-2.0.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 3.9 MB
Release files / fitscube_rs-2.0.0.tar.gz
| Download URL | fitscube_rs-2.0.0.tar.gz |
|---|---|
| Size | 222.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62d587ea9bedb3d9e38eb811e39422c94010f10123b844e2b75f2b437d6a4503
|
|
BLAKE2b-256 checksum How to use checksums |
dfb4ab051607e271d99f9b09d10ffc50d10b4861744eaa702bf4f465be6990c7
|
| 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 14, 2026.
Transparency logRelease files / fitscube_rs-2.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | fitscube_rs-2.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e011ce5ae76841de3f4d21550ef620c00ff446d7799929b8a7a92fd0fbeca559
|
|
BLAKE2b-256 checksum How to use checksums |
a2e4dc7e3f14bd77ba6e6a59dc3cde807fcc37712ff07c4d1e2343876d0a9974
|
| 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 14, 2026.
Transparency logRelease files / fitscube_rs-2.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | fitscube_rs-2.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
f186ce61284e941d22116874e98e2c18609a911223e9460d34892f3edcdc59f3
|
|
BLAKE2b-256 checksum How to use checksums |
105ca424e48f3e5241515226e5ea72775303c87ab711e3717a8b217ced47c6f5
|
| 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 14, 2026.
Transparency logRelease files / fitscube_rs-2.0.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | fitscube_rs-2.0.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f88e846a001fdc1f02e9b0a1ca42e34544202b646851a5a83477c1b6de06deb7
|
|
BLAKE2b-256 checksum How to use checksums |
0c925017ab60b0fd44053d09b5b1308158ba5925d7bb14393008b37c9269a27e
|
| 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 14, 2026.
Transparency logSecurity for fitscube-rs 2.0.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
All 4 files in this release have been uploaded with provenance metadata.
Attestation for fitscube_rs-2.0.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 14, 2026.
Transparency logA 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.