Skip to main content

convolve-rs

Docs docs.rs PyPI crates.io

Documentation: Python API, CLI, and algorithm background at convolve-rs.readthedocs.io; Rust API at docs.rs/convolve-rs.

A Rust port of beamcon from RACS-tools. Smooths FITS images and spectral cubes to a common beam using UV-plane (FFT) convolution to avoid numerical issues 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 the result alongside any API changes.

Running tests

Python tests need the compiled extension and the test extra (pytest, radio-beam, astropy). uv sync builds the maturin extension into .venv, so a plain uvx pytest won't work: it runs in an isolated env with neither the module nor the deps:

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 against MIRIAD; point MIRIAD_BIN at a MIRIAD bin directory to enable it (it is skipped when unset):

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

Pre-commit hooks

Formatters and linters run via prek, a fast drop-in pre-commit reimplementation. The hooks (.pre-commit-config.yaml) are the same checks CI enforces: ruff lint + 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.

It builds on prior work in the radio-astronomy community: the UV-plane convolution and cube handling are ported from RACS-tools, and the common-beam computation follows radio_beam (both BSD). The Gaussian beam algebra implements the standard formulae of Wild (1970), and MIRIAD (GPL) serves as a validation reference in the test suite. See NOTICE.md for full attributions.

Metadata

Release files for convolve-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)

Source distribution for convolve-rs 2.0.0
File Size Uploaded Provenance Actions
convolve_rs-2.0.0.tar.gz 532.9 kB With provenance Details for convolve_rs-2.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for convolve-rs 2.0.0
File Interpreter ABI Platform Actions
convolve_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 for convolve_rs-2.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
convolve_rs-2.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for convolve_rs-2.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
convolve_rs-2.0.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for convolve_rs-2.0.0-cp310-abi3-macosx_11_0_arm64.whl

Total release size: 3.4 MB

Release files / convolve_rs-2.0.0.tar.gz

Download URL convolve_rs-2.0.0.tar.gz
Size 532.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4da5c1b9cd8af7c7a7439f55cc35628c0550ffaab7084312ac9b0b19cc2c29d2
BLAKE2b-256 checksum
How to use checksums
c0f1d9a554ac372d49fb139f67229de3f9200a7cb73e6f43e4d497dd5e87b337
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 log

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

Download URL convolve_rs-2.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
87b385c29ce7dca15ad17d8f86e9ba3c3d809846057500311014fecce53b97d4
BLAKE2b-256 checksum
How to use checksums
6cb2af384fff5d4f9d826a0e5ae8aa8868137ee8ec146a4569a054f4ad4ad204
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 log

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

Download URL convolve_rs-2.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 905.5 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
a3f8564c6b7208ab1e49a06fe8975eaa6fa15177bd56595a91fcccf8e973221e
BLAKE2b-256 checksum
How to use checksums
28003e61ce782ee2c007ff4c1533399ee2b3dbda37236527e50874e093bdc2f8
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 log

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

Download URL convolve_rs-2.0.0-cp310-abi3-macosx_11_0_arm64.whl
Size 784.3 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
900e0dc1f0aa528aa494eb41e21516e1bc42623df7d7f76630cc328ea0664085
BLAKE2b-256 checksum
How to use checksums
1b099097981b95bc6ed6118908715c9825a60890ac2bba2c6602ad198d3a7a0b
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 log

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

Select from 4 files

Attestation for convolve_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 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