Pyralysis
PYthon Radio Astronomy anaLYSis and Image Synthesis
Regularized image reconstruction for radio interferometry — simulate an array, state χ² + regularizers, reconstruct on CPU or GPU. Not a black-box CLEAN.
Pyralysis is a Python library (Dask, optional CuPy) for simulation, gridding, and image reconstruction. You compose the objective; there is no hidden imager. Guides: Read the Docs · website: clirai.gitlab.io.
You can
Simulate an observation
VLA, ALMA, or a custom antenna config; parametric or FITS sky models; thermal noise and gain injectors.
ALMA C-9, Band 6 (230 GHz), 2 h with thermal noise: a protoplanetary disk (Planck brightness, T ∝ r−1/2, optically thick core, gaps and rings) built from 80 DiskSource rings, plus three background sources — sky, uv coverage, and the real part of the visibilities against deprojected uv distance.
Simulation ·
examples/scripts/simulation_components.py
Make a dirty map and PSF
Natural, uniform, or robust weights, then a dirty image and dirty beam.
Visibility weights ·
Gridding ·
examples/scripts/dirtymapper_components.py
Reconstruct a model
State χ² plus L1, TSV, or other regularizers; solve with FISTA, L-BFGS, or SDMM. The figures below are MFISTA (monotone FISTA) on χ² + L1 from zeros, natural weights, on the GPU (CuPy).
Dirty image → MFISTA reconstruction (Jy/pixel) → residual. Same ALMA disk simulation as above; square-root stretch.
MFISTA (monotone FISTA) iterates from a zero start.
Regenerate the gallery with python docs/scripts/generate_readme_figures.py.
Optimization ·
FISTA ·
examples/scripts/optimization_components.py
Image with closures, on GPU, or on a cluster
Closure-phase / closure-amplitude terms; the same stack on CuPy or a Dask cluster; read and write Measurement Sets, Zarr, and FITS.
Closures · Array backends · Pipelines · I/O
Notebooks without installing: Binder. How the pieces fit together: composability, flexibility, extensibility, adaptability.
Install
Python 3.11–3.13. The SKA extra index is required for a few dependencies.
pip install --extra-index-url https://artefact.skao.int/repository/pypi-internal/simple pyralysis[all]
GPU: micromamba create -f envs/cuda13.yml (Maxwell/Pascal/Volta: envs/cuda12.yml, Kepler: envs/cuda11.yml; see envs/README.md). Details: installation.
Minimal example
Simulate a point source, add thermal noise, make a natural-weighted dirty image:
from importlib.resources import files
from astropy import units as u
from pyralysis.io.antenna_config_io import AntennaConfigurationIo
from pyralysis.simulation import Simulator
from pyralysis.models.sky import PointSource
from pyralysis.injectors import ThermalNoiseInjector
from pyralysis.transformers.weighting_schemes import Natural
from pyralysis.transformers import DirtyMapper
cfg = files("pyralysis.simulation") / "antenna_configs" / "vla.c.cfg"
interferometer = AntennaConfigurationIo(input_name=str(cfg)).read()
interferometer.configure_observation(
min_frequency=1e9 * u.Hz, max_frequency=1.1e9 * u.Hz, frequency_step=1e7 * u.Hz,
right_ascension="12h00m00s", declination="45d00m00s",
integration_time=10 * u.s, observation_time="1h",
)
source = PointSource(
reference_intensity=1.0 * u.Jy, sky_position="12h00m00s 45d00m00s",
reference_frequency=1e9 * u.Hz,
)
dataset = Simulator(interferometer=interferometer, sources=source).simulate(create_dataset=True)
dataset = ThermalNoiseInjector(system_temperature=50, integration_time=10, channel_bandwidth=1e6).apply(dataset)
imsize, cellsize = 128, dataset.theo_resolution / 3.5
Natural(imsize=imsize, cellsize=cellsize, input_data=dataset).transform()
dataset.calculate_psf()
dirty, _beam = DirtyMapper(input_data=dataset, imsize=imsize, cellsize=cellsize, stokes=["I"]).transform()
Reconstruction (χ² + L1, FISTA, GPU) is the same composition as the figures — optimization, quickstart.
Project activity
Updated daily. The Pyralysis website has an activity page listing the public forks.
Links
Docs · API · Examples · Contributing · Changelog · Issues
@software{carcamo2021pyralysis,
author = {Miguel Cárcamo},
title = {Pyralysis: A Python framework for radio interferometric imaging and simulation},
year = {2021},
url = {https://gitlab.com/clirai/pyralysis},
note = {https://pyralysis.readthedocs.io/}
}
GPL-3.0-only — see LICENSE. Contact: miguel.carcamo@usach.cl
Metadata
Release files for pyralysis 3.1.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 | |
|---|---|---|---|---|
| pyralysis-3.1.0.tar.gz | 18.6 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyralysis-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.9 MB
Release files / pyralysis-3.1.0.tar.gz
| Download URL | pyralysis-3.1.0.tar.gz |
|---|---|
| Size | 18.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bff4d0775b1f7a691107cf91092469b0ad4f9168098c6fd111a367f3ed67d94
|
|
BLAKE2b-256 checksum How to use checksums |
fb17e3ecbde25010454467c524e478cceaf1f232dc4d0b995da08db813cf587f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / pyralysis-3.1.0-py3-none-any.whl
| Download URL | pyralysis-3.1.0-py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a627e32276ae4a002fcb506b15183712d34057b5556b5f82da0dc3da8a2bda7
|
|
BLAKE2b-256 checksum How to use checksums |
2dd5b181522b50d7324ddce2a5257f2b03f3c3f49773c590cbf9b0f045717234
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for pyralysis 3.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.