PyAuto

Open-source software for astronomy and Bayesian inference: compose and fit probabilistic models, measure galaxy morphology, and model strong gravitational lenses — accelerated by JAX on GPUs.

The stack

Three packages, one design: each layer is usable on its own, and each builds on the one before it.

PyAutoFit

A probabilistic programming language for model composition and fitting: build models from Python classes, fit them with nested sampling, MCMC or maximum-likelihood searches, and manage large fitting campaigns with databases and graphical models.

pip install autofit

PyAutoGalaxy

Galaxy morphology and structure: light and mass profiles, multi-wavelength imaging and interferometry, and automated fitting of large galaxy samples — from parametric profiles to pixelised reconstructions.

pip install autogalaxy

PyAutoLens

Strong gravitational lensing: ray-tracing, lens modeling and source reconstruction for imaging, interferometry and point sources, built for the large lens samples of Euclid, Rubin and the SKA.

pip install autolens

Learn and drive PyAuto with AI

Alongside the documentation and tutorial courses, AI is a first-class way to use PyAuto.

Ask an AI assistant

Point ChatGPT or Claude at the autolens_assistant repository and ask your question — it gives the assistant curated, up-to-date knowledge of the API, the scientific methods and worked analysis recipes.

Run it with an agentic coding tool

Agentic tools such as Claude Code or Codex can run PyAuto end-to-end on your machine: set up an analysis, fit models, and interpret results, using the same assistant repository as their guide.

Try it in the browser

No installation needed — the introductory notebooks run on Google Colab.

PyAutoLens on Colab

Model your first strong gravitational lens in a browser notebook.

Tutorial courses

Lecture-style Jupyter courses teach each package from first principles: statistics and model fitting, galaxy structure, and strong lensing.