Skip to main content

virgil

PyPI version License: MIT integration Documentation

dev carbon | 76.5 kg CO2e

Versatile Interferometric Reconstruction and Gradient-based Inference Library.

Contributors: Dori Blakely, Benjamin Pope, Louis Desdoigts, Shashank Dholakia, Toon De Prins, Jonah Goldfine, Max Charles.

facilis descensus averno

What is virgil?

virgil models optical interferometry data in JAX. It fits parametric models and reconstructs images in one framework, and runs on GPUs and clusters.

Stability

Everything public is stable (a change needs a deprecation cycle) except a list of provisional features that are new in 0.4 and may change in any 0.4.x release without one: orbit fitting across epochs and aliases, the MultipoleDisk family, Gaussian-process ensembles, variational inference, the pipelines, CLEAN and the image-recovery metrics. See the list of provisional features.

Installation

Install virgil from PyPI, where it is called virgil-astro:

pip install virgil-astro

pip install virgil installs an unrelated package. Use Python 3.12 or newer: JAX 0.11 needs it, and Python 3.11 gets the last JAX release that supports it.

Optional extras: pip install "virgil-astro[plots]" adds pandas and ChainConsumer for the corner plots in virgil.plotting, and [legacy] adds astroquery for the SIMBAD lookups in virgil.legacy. virgil.orbits solves Kepler's equation with jaxoplanet, from pip install "virgil-astro[orbits]". The module imports without it; only evaluating an orbit's positions or calling to_jaxoplanet needs it, and then the error names the extra.

The tutorials are in the GitHub repository, not in the wheel. pip install "virgil-astro[notebooks,pipeline]" installs everything they use.

To build from source, clone the repository:

git clone --filter=blob:none https://github.com/benjaminpope/virgil
cd virgil
pip install .

--filter=blob:none makes a partial clone: you get the full history, but old file versions download only when you ask for them. That skips large data files no longer in use, so the download is about 15 MB rather than about 280 MB.

Work in a virtual environment. With uv (recommended):

uv python install 3.12
uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python -e ".[test]"
.venv/bin/python -m pytest tests/test_models_core.py -q

Where to start

Documentation is published at benjaminpope.github.io/virgil. New here? The quickstart loads an OIFITS file and fits a binary in about twenty lines.

I want to Go to
Read my OIFITS file Reading data
Find and fit a companion Binary search
Set a contrast limit or a detection limit Contrast limits
Fit a binary's orbit Which orbit tool?, then Orbits from interferometric data
Make an image Simulating AMI data, then Regularized maximum likelihood
Run a whole analysis in one command Pipelines
Check which features may change Stability

Independent validation

virgil's own tests mostly check virgil against itself. The companion repository virgil-validation checks it against code that shares nothing with it: textbook visibilities for geometric primitives, uv tracks and OIFITS files built from first principles, and aperture-masking images simulated with dLux for virgil to read and fit. To ask for another check, open an Issue there naming the model or function, the independent result it should match, and the precision you expect.

Collaboration & Development

Contributions are welcome. CONTRIBUTING.md covers setup, testing and the pull-request workflow. Release notes are in the changelog.

Name

VIRGIL is the Versatile Interferometric Reconstruction and Gradient-based Inference Library. In Dante's Divine Comedy, the poet Virgil is Dante's guide through the Inferno and Purgatory. In Virgil's own Aeneid, when Aeneas enters the underworld he draws his sword on the monsters crowding its threshold. His guide, the Cumaean Sibyl, warns him that they are only thin, bodiless lives flitting in a hollow semblance of form (Aeneid VI.292–294). Images reconstructed from sparse interferometric data are full of such false visions: artefacts that look like structure but have no substance in the data. VIRGIL helps you tell the difference. The acronym is Jonah Goldfine's.

Formerly drpangloss

Until version 0.1.1 this package was called drpangloss, after Voltaire's Dr Pangloss and as a nod to Antoine Mérand's CANDID. From version 0.2.0 it is virgil: import virgil, installed with pip install virgil-astro. A final drpangloss release (0.2.0) depends on virgil-astro and points here, so old installs find the new package.

e quindi uscimmo a riveder le stelle

Metadata

Release files for virgil-astro 0.4.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 virgil-astro 0.4.0
File Size Uploaded Provenance Actions
virgil_astro-0.4.0.tar.gz 614.7 kB With provenance Details for virgil_astro-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for virgil-astro 0.4.0
File Interpreter ABI Platform Actions
virgil_astro-0.4.0-py3-none-any.whl Python 3 none any Details for virgil_astro-0.4.0-py3-none-any.whl

Total release size: 1.3 MB

Release files / virgil_astro-0.4.0.tar.gz

Download URL virgil_astro-0.4.0.tar.gz
Size 614.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ced99db2fd2b02e416ed782cad6b6325243cb55a7db8cf020f89c05c992672f4
BLAKE2b-256 checksum
How to use checksums
2be693b524910f9a4c13ee8fd2b4672725670e486dc72bc615202c8beccd0e78
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 22, 2026.

Transparency log

Release files / virgil_astro-0.4.0-py3-none-any.whl

Download URL virgil_astro-0.4.0-py3-none-any.whl
Size 642.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a45cc6d7a992045f44f910098d1e37f91be43106d8f27d9775dc0830c0a775a4
BLAKE2b-256 checksum
How to use checksums
31fea25ffb3ae7c7f1c9b3ccf5c07fd3ad46c664328b2ab20db5d73881d9cf4b
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 22, 2026.

Transparency log

Security for virgil-astro 0.4.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for virgil_astro-0.4.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 22, 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