Installation Guide | readthedocs | Introduction on Colab | HowToLens
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 and PyAutoLens makes it simple to model strong gravitational lenses, using JAX to accelerate lens modeling on GPUs.
You can use PyAutoLens by describing what you want in natural language, through the PyAutoLens AI Assistant, or by writing Python yourself. Both routes use the same software. To start in natural language, paste this prompt into Claude Code, Codex or another AI coding agent:
Starting prompt for Claude Code, Codex or other 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 takes you through the Start Here page as a conversation (grids, light and mass profiles, ray-tracing, then simulating and fitting a strong lens), one step at a time, then helps you get started on your own lenses. Claude Code and Codex are recommended, and sustained scientific use normally needs paid access to one of them. Free options are listed on the AI Options page. Start Here explains why PyAutoLens is designed to be used in natural language, and why its Python API is not going anywhere.
All of the documentation and examples are written for people to read:
- The PyAutoLens readthedocs: which includes an overview of PyAutoLens's core features, a new user starting guide and an installation guide.
- The introduction Jupyter Notebook on Google Colab: try PyAutoLens in a web browser (without installation).
- The autolens_workspace GitHub repository: example scripts covering every PyAutoLens use case.
- The HowToLens GitHub repository: a Jupyter notebook lecture series teaching strong lensing and lens modeling from the ground up.
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.
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.
Information on how to cite PyAutoLens in publications can be found on the citations page.
i found you, i found you, i found you beautiful, exploding, i found you
