https://github.com/Jammy2211/PyAutoLogo/blob/main/gifs/pyautolens.gif?raw=true

What is PyAutoLens?#

When two or more galaxies are aligned perfectly down our line-of-sight, the background galaxy appears multiple times.

This is called strong gravitational lensing. PyAutoLens models strong gravitational lenses to measure the distribution of matter and reconstruct distant galaxies. Its JAX numerical backend provides automatic differentiation and GPU acceleration, while the PyAutoLens Assistant helps you develop and run analyses through conversation.

Getting Started#

Explore It Yourself#

Explore more examples in the workspace, or learn lensing from the ground up with HowToLens.

Explore with AI#

The PyAutoLens AI Assistant lets you explore gravitational lensing through conversation. Ask a question, explore an idea, or describe the analysis you want to run. Both routes use the same software. To get started, paste this prompt into Claude Code, Codex or another AI coding agent:

I want to do strong lensing science with PyAutoLens (https://github.com/PyAutoLabs/PyAutoLens) and the autolens_assistant (https://github.com/PyAutoLabs/autolens_assistant). First clone that repository, cd into it and follow its AGENTS.md.

Begin the “start here” guide for a new user.

The assistant guides you through Start Here as a conversation, then helps you analyse your own lenses. See AI Options for recommended tools, costs and free alternatives.

Community & Contributing#

PyAutoLens is built in the open by its users: everyone is welcome to ask questions, share what they have made with it, and contribute.

Questions, ideas and bug reports: the PyAutoLabs Discussions. Chat with us on Slack.

Community-built tools and tutorials, and how to contribute: the PyAutoLens community page.

HowToLens#

For users less familiar with gravitational lensing, Bayesian inference and scientific analysis you may wish to read through the HowToLens lectures. These teach you the basic principles of gravitational lensing and Bayesian inference, with the content pitched at undergraduate level and above.

A complete overview of the lectures is provided on the HowToLens readthedocs page, and the notebooks themselves live in the PyAutoLabs/HowToLens repository.

Citations#

Information on how to cite PyAutoLens in publications can be found on the citations page.