Skip to main content

rang-core

MeerKAT calibration, flagging and imaging research on one Rust core, driven from Python.

wheels docs

Documentation · Tutorials · Research index · Changelog

Status, November 2026: a tested research demonstrator, not an operational calibrator. No novelty is claimed: the goal is better calibration and imaging at comparable cost, or comparable quality at much lower cost, and neither has been shown. Two questions are closed as null, as tested: a gain-TV-guided threshold flagging policy, and beam and pointing. A flagger trained on gain TV is a separate question, not yet tested, and the next experiment. A deeper field model (an external catalogue) is the first condition for reopening beam and pointing on real data.

What it is

  • A Rust core. A Measurement Set reader and casacore table writer, zarr ingest with HTTP range fetch, QuartiCal's full-Jones solver, Tricolour's SumThreshold strategies, WSClean's imaging weights and w-stacking gridder (CPU and GPU), ducc0's wgridder, CASA's flux standards and a component predictor.
  • A Python package and command line. import rang reaches every kernel through the extension rang._core, which releases the GIL. rang-core STAGE VERB replays, compares and archives each chain and writes a versioned receipt.
  • The tools' file formats. CASA calibration tables, QuartiCal stores, Tigger, WSClean and BBS sky models, H5parm, killMS solutions, CASA flag versions and MeerKAT MVFv4 archives (rang-core formats check and convert).
  • Oracles. Each port is gated on reproducing the upstream tool's output: QuartiCal, Tricolour, AOFlagger, WSClean, ducc0, casacore, CASA and katdal.

Install

pip install rang-core

The first PyPI release, v0.1.0, is pending; until then, build from source. One abi3 wheel per platform serves CPython 3.10 and newer, needs no Rust compiler and carries every kernel: Linux x86_64 and aarch64 (glibc 2.28 or newer), macOS arm64 and x86_64, Windows x86_64.

Extra For
notebook the tutorials and rang.notebook
imaging FITS output of the gridders
pointing, beam the JAX pointing path; the katbeam and EIDOS beam controls
meerkat, formats MVFv4 archives through katdal; H5parm
recipes, carta the Stimela2 recipes (Python 3.13); CARTA from the notebooks
test, docs the test suite; the documentation site

From source, with Rust 1.93 and cargo on PATH (more in the installation guide):

git clone https://github.com/gijzelaerr/rang-core && cd rang-core
python3 -m venv .venv
.venv/bin/python -m pip install -e '.[notebook,test]'

Quick start

Load the public 45 MB MeerKAT fixture (four antennas on PKS 1934−638) and solve its full-Jones gains on the Rust core. With pip install 'rang-core[notebook]':

from rang.notebook import data, gains

zip_path = data.download_fixture("rang-cache")   # once; SHA256 checked
ds = data.load_fixture(zip_path, cache_dir="rang-cache")
s = data.summary(ds)
print(s["dataset"], "|", s["antennas"], "|", s["channels"], "channels")
m = gains.solve(ds)["metrics"]
print(f"gain TV {m['tv']:.4f}  test MSE {m['losses']['test']:.3f}")

After the download it takes about two seconds and prints:

fixture scan 9 (J1939-6342) | m000, m001, m002, m003 | 4096 channels
gain TV 0.1474  test MSE 24.920

The command line's main stages (rang-core -h lists them all):

Stage Chain
flags Tricolour's SumThreshold strategies
gridder, wgridder, weights, imaging gridders, imaging weights, the imaging replay
campaign, campaign-array, campaign-1830, campaign-fieldmodel the LUNO real-data campaigns
injections, actions, prospective, signal, trend the flagging experiment's tracks
ms, meerkat, formats the readers and file formats
check the full local checks, on any platform

Documentation

  • The site: installation, concepts, the command line and the research story.
  • Tutorials and science notebooks: five tutorials (data and rank, flagging, gains and TV, imaging, the flagging experiment) and two research notebooks (the flagging verdict; beam and pointing), executed on the fixture.
  • API reference, generated from the docstrings.

Research results

Question Verdict Report
Port the pipeline to one Rust core Done: the archived chains reproduce, the solver to 1.4e-15; engineering, not a scientific claim architecture, simplification
Does a gain-TV-guided threshold policy improve flagging? Null: 90 pre-registered calls, none better or worse, at 4.6–5.9× the cost of CARACal's first pass verdict
Can a flagger trained on gain TV be faster, with fewer tunable parameters? Open: not tested yet; the row above does not answer it what the verdict covers
Can selected pointing corrections beat the baselines on real data? Null: self-calibration works in simulation (0.62′ to 0.054′), selection adds nothing measurable, and neither arm measures pointing on ESO137 with the self-calibrated model; an external catalogue is the first reopening condition B1-3, B1-2, B1
What is proven about CLEAN? Data-fit convergence since Schwarz (1978); here a Gram-matrix formalism, Lean proofs and the measured exact-recovery transition theory, transition
An exact gridder ducc0's wgridder ported at its speed; the w-stacking gridder on a GPU gains 1.2–3.3× over 16 threads wgridder, GPU
A casacore table writer Byte-identical to casacore 3.8.1 and CASA 6.7.6, bar uninitialised memory and alignment gaps writer, the last of it
Re-validation against upstream Tricolour 0.5.0-dev flag-identical; QuartiCal's #452 fix reproduced to 1e-15; AOFlagger agrees at kernel level, differs at stage level; CASA gaincal is 75–350× slower RV1, AOFlagger, gaincal

Everything else, including the negative results and the earlier pointing pilots, is in the research index; the latest progress is in STATE.

Repository guide

Path Contents
core/, src/ the Rust core (core/py builds rang._core); the root crate with the pointing toy and gain TV
python/rang/ the Python package, the command line and the JAX reference path
notebooks/, docs/ the tutorials and science notebooks; the documentation site
examples/, tests/ reproducible experiments and comparators; the test suite
recipes/ core-native Stimela2 recipes
research/, formal/ reports and compact result archives; Lean proofs
history/, data/ the frozen campaigns; fixture provenance

Names

The project, repository, PyPI distribution and command line are rang-core; the Python package is rang (rangtoy in notes written before the rename). "Rang" began as Radio Astronomy Next Generation, and rang is Dutch for rank, the first thing the identifiability survey measures.

Contributing

CONTRIBUTING.md has the local checks, the release procedure and the reporting rules.

Licence and data acknowledgements

rang-core is free software under the GNU General Public License, version 3 or later. Ported code keeps its upstream notices; no raw visibilities or beam maps are redistributed.

  • MeerKAT data. The MeerKAT telescope is operated by the South African Radio Astronomy Observatory, which is a facility of the National Research Foundation, an agency of the Department of Science and Innovation.
  • L-band holography beams (de Villiers 2023, DOI 10.48479/wdb0-h061): CC BY-NC 4.0.
  • ESO137 field (Ramatsoku et al. 2020): CC BY 4.0.

Per upstream and dataset: licence and acknowledgements.

Citation

Cite the software through CITATION.cff (GitHub's "Cite this repository").

Metadata

Release files for rang-core 0.1.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 rang-core 0.1.0
File Size Uploaded Provenance Actions
rang_core-0.1.0.tar.gz 1.3 MB With provenance Details for rang_core-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rang-core 0.1.0
File Actions
rang_core-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for rang_core-0.1.0-cp310-abi3-win_amd64.whl
rang_core-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for rang_core-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
rang_core-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for rang_core-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
rang_core-0.1.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for rang_core-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
rang_core-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for rang_core-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 16.0 MB

Release files / rang_core-0.1.0.tar.gz

Download URL rang_core-0.1.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
bd524c0f61026682df286aebd027207c0177e53017a5aaf12b587e6e2c690d9d
BLAKE2b-256 checksum
How to use checksums
0bec8c3afa4a7dd2b437bbe39b532cb89bf6f75e1745634fbebe59709deee76b
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 2, 2026.

Transparency log

Release files / rang_core-0.1.0-cp310-abi3-win_amd64.whl

Download URL rang_core-0.1.0-cp310-abi3-win_amd64.whl
Size 3.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1a55c340a9feef69e657d6134e95c7c45eddb6570c3c9c88eb75cf1c98ea93fe
BLAKE2b-256 checksum
How to use checksums
43667971e4f660be7df92df7fe97e6ddbf041a51e20c2ec33cb679fa4c4a2ea6
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 2, 2026.

Transparency log

Release files / rang_core-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL rang_core-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
Size 3.3 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
de35459ee1ae73632e6560b1802f59d87d3fa0c8bb58e94b129ec3b5a9c04929
BLAKE2b-256 checksum
How to use checksums
d3dd0f5e33261e36cb04becf2415dcd29c56f21c00f36decfe7676f2a3fd3b6c
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 2, 2026.

Transparency log

Release files / rang_core-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL rang_core-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
Size 2.6 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
35b94a365f690e8255a706cf56f89fe27180dea2bf42933aaba4a7d57617b650
BLAKE2b-256 checksum
How to use checksums
7785d492f73d2a86621c2f96206c510f463b60692ad0dfafa023fdff234cf731
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 2, 2026.

Transparency log

Release files / rang_core-0.1.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL rang_core-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Size 2.5 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
22a4bf19df7e6b957af66ba9f2dbfd9903b92605ed764d9d0a7f065b18b0c1c3
BLAKE2b-256 checksum
How to use checksums
efb3c2893e82b99c6eb15a8dbf319863818c37e819cfb54753beb66f4189d501
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 2, 2026.

Transparency log

Release files / rang_core-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL rang_core-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.2 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3b420c9d39025efb51cfc9814d44372e932a3a0191795b3429aa63b48248232f
BLAKE2b-256 checksum
How to use checksums
31c406e65f6c6c3bbcca30498265272e8f6116c994a116d73106fd3e8b019c12
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 2, 2026.

Transparency log

Security for rang-core 0.1.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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for rang_core-0.1.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 Nov 2, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files Full provenance

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