Contributions
The present version of virgil actually represents a synthesis of many projects from a whole research team and features we have liked from other packages, where we have used Claude Code Opus 5.5 not to develop everything from scratch but to take a lot of existing ideas and connect them in a common framework. GitHub Copilot's coding agent also wrote a good deal of the code in 2026, especially tests, fixes in response to code review, the Laplace uncertainty tools for grid searches, and some tutorials. The commit history therefore does not properly reflect the credit to be assigned to people and their ideas. We estimate the energy and carbon cost of this AI-assisted development, and of the project's CI and cluster jobs, on the Development carbon page.
The project began as a collection of functions by Dori Blakely for the Blakely et al. PDS 70 paper (AJ 169, 137, 2025), and then was rewritten (with human hands!) by Benjamin Pope and Louis Desdoigts for a series of related projects, which we put out as the first drpangloss repo. In particular Louis is to be credited with the fast Jax syntax for grid searches, and with the first kernel-phase support. Dori also worked on the first example notebook of Bayesian upper limits following Ruffio et al. (2018). The project was called drpangloss as a reference to Voltaire's Candide and Antoine Mérand's code CANDID. Doctor Pangloss in that work is known for his (irrational and excessive) belief we are in the best of all possible worlds and this was a fun way to think about having CANDID with better optimizers.
By 2026 the project had outgrown this simple joke, and the team decided to adopt the name virgil at Benjamin Pope's suggestion. Jonah Goldfine came up with the acronym: VIRGIL, the Versatile Interferometric Reconstruction and Gradient-based Inference Library. In Dante's Divine Comedy, Virgil is the poet's guide through the underworld; the README explains why that suits image reconstruction.
Several of Louis's other projects run through the package. Every model is built on his zodiax, whose dot-paths ("comp.flux") are the public fitting interface. The AMI data products come from his AMIGO pipeline (Desdoigts et al. 2026, PASA 43, e075): virgil.amigo reads its mixed-DISCO format, and virgil.coverage simulates data in that form, following AMIGO's latent visibility basis. The matrix Fourier transform was checked against the one in his dLux.
We have added a number of geometric primitives from Dori Blakely's paper and Jonah Goldfine's unpublished work on PDS 70 and from Toon De Prins' work on post-AGB disks. We have also merged Shashank Dholakia's unpublished thesis work on the visibilities of rapidly-rotating stars, and implemented an interface to his harmonix package, and re-implemented and improved Pope's contribution to this in the Jax Bessel function implementations. The Jax translation of the CEPHES Bessel functions, now the separate package jaxbessel that virgil uses, is itself adapted from harmonix. Back in 2024, Shashank also made drpangloss work with spectrally dispersed data, with several wavelength channels in one OIFITS file. All of these inclusions were accomplished with Claude Code.
The image deconvolution code is largely a port and extension of the visibility-based part of dorito by Max Charles, written for his paper on JWST NIRISS/AMI (PASA 43, e048, 2026). To this we have added Gaussian Process image priors abstracted from the Enßlin group's nifty. Some of the inspiration for dorito was from our colleague Ian Czekala's package MPoL. Both the port and the Gaussian Process priors were accomplished with Claude Code.
Methods
Much of the package implements methods from the literature, which we cite in the docstrings where they are used:
- detection limits following CANDID (Gallenne et al. 2015) and Absil et al. (2011), and Bayesian upper limits following Ruffio et al. (2018);
- chromatic scenes of stars and an environment with their own spectra, following SPARCO (Kluska et al. 2014);
- maximum-entropy imaging, and the choice of its weight by Gull and Skilling's "classic MaxEnt" (Gull 1989; Skilling 1989), building on the "historic" MaxEnt of Skilling & Bryan (1984);
- the Bayesian evidence for regularization hyperparameters and the re-estimation of error bars, following MacKay (1992);
- correlated closure phases, following Jens Kammerer and collaborators (Kammerer et al. 2020), who showed that closure phases that share a baseline are correlated, with correlation ±1/3 for equal noise; virgil builds on this by keeping only the independent combinations of closure phases and treating their covariance in the likelihood;
- the matrix Fourier transform of Soummer et al. (2007).
- The legacy OIFITS tools in
virgil.legacyare derived from ImPlaneIA, the NIRISS AMI analysis package of Anand Sivaramakrishnan and collaborators.
Software
virgil is built on JAX, and on Patrick Kidger's equinox, optimistix and lineax, together with optax and numpyro.