Skip to main content

convolve-rs

Docs docs.rs PyPI crates.io

Documentation for the Python API, CLI and algorithms is at convolve-rs.readthedocs.io. The Rust API is at docs.rs/convolve-rs.

A Rust port of beamcon from RACS-tools. It smooths FITS images and spectral cubes to a common beam. The convolution is done in the UV plane (FFT), which avoids numerical problems with undersampled kernels.

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 convolve-rs

CLI binary

Requires Rust 1.85+.

cargo install convolve-rs

Usage

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 convolve_rs._convolve_rs import _generate_stubs; _generate_stubs()"

This overwrites convolve_rs/_convolve_rs.pyi from the Rust annotations and docstrings. Commit it with the API change.

Running tests

Python tests need the compiled extension and the test extra (pytest, radio-beam, astropy). uv sync builds the extension into .venv. uvx pytest does not work, because it runs in an isolated environment without the module or its dependencies.

uv sync --extra test       # builds the extension + installs test deps
uv run --no-sync pytest

Rust tests run with cargo test. One integration test compares output with MIRIAD. Set MIRIAD_BIN to a MIRIAD bin directory to run it; it is skipped otherwise.

cargo test
MIRIAD_BIN=/path/to/miriad/bin cargo test   # include the MIRIAD comparison

Pre-commit hooks

Formatters and linters run with prek, a reimplementation of pre-commit. The hooks in .pre-commit-config.yaml are the checks CI runs: ruff lint and format, ty type checking, 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

convolve-rs is released under the BSD 3-Clause License.

The UV-plane convolution and cube handling are ported from RACS-tools. The common-beam computation follows radio_beam. Both are BSD licensed. The beam algebra uses the formulae of Wild (1970). MIRIAD (GPL) is used as a reference in the tests. See NOTICE.md for full attributions.

Metadata

Release files for convolve-rs 3.0.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 convolve-rs 3.0.3
File Size Uploaded Provenance Actions
convolve_rs-3.0.3.tar.gz 594.5 kB With provenance Details for convolve_rs-3.0.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for convolve-rs 3.0.3
File Interpreter ABI Platform Actions
convolve_rs-3.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for convolve_rs-3.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
convolve_rs-3.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for convolve_rs-3.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
convolve_rs-3.0.3-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for convolve_rs-3.0.3-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 6.0 MB

Release files / convolve_rs-3.0.3.tar.gz

Download URL convolve_rs-3.0.3.tar.gz
Size 594.5 kB
Tags Source
SHA-256 checksum
How to use checksums
585fad6b4450e3ced357ac266c7ed15c6559ccb939cd466ac0c8b6ac657ab80a
BLAKE2b-256 checksum
How to use checksums
4f254c9159dfec108aa837067048df13a788f659447aa1b73efaf14cb2424e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / convolve_rs-3.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL convolve_rs-3.0.3-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
f6c40661b7031f71a5a8572da752539e8c6548e479a30e97d825f00cf86ac998
BLAKE2b-256 checksum
How to use checksums
ea4d9c0071fd4f75577b15efc91af7bd956ef8bece2df406e056150b57a20e70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / convolve_rs-3.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL convolve_rs-3.0.3-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 1.8 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
dfcc58a2ad6e9fd24ae6d3fffa22c59c7290cdd87f98d1d5b1489f37c8eeb6b0
BLAKE2b-256 checksum
How to use checksums
cfc46f84f82a8b15e815fcf6f0653894bc138c00c3856877acbed73dc0527e0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / convolve_rs-3.0.3-cp310-abi3-macosx_11_0_arm64.whl

Download URL convolve_rs-3.0.3-cp310-abi3-macosx_11_0_arm64.whl
Size 1.6 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fc77f3d2c4b36f595560bb46f0b986b3600f564dc77ae99f6dd117441586eb6c
BLAKE2b-256 checksum
How to use checksums
cb7dba766b7fe5591c8cbc817cf0768a7f4614c7796288a700a37629a83f4feb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for convolve-rs 3.0.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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for convolve_rs-3.0.3.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 Nov 27, 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