Installation Guide | readthedocs | Introduction on Binder | HowToLens
Welcome to the PyAutoLens Workspace. You can get started right away by going to the autolens workspace Binder. Alternatively, you can get set up by following the installation guide on our readthedocs.
If you haven't already, install PyAutoLens via pip or conda.
Next, clone the autolens workspace
(the line --depth 1
clones only the most recent branch on
the autolens_workspace
, reducing the download size):
cd /path/on/your/computer/you/want/to/put/the/autolens_workspace
git clone https://github.com/Jammy2211/autolens_workspace --depth 1
cd autolens_workspace
Run the welcome.py
script to get started!
python3 welcome.py
The workspace includes the following main directories:
notebooks
: PyAutoLens examples written as Jupyter notebooks.scripts
: PyAutoLens examples written as Python scripts.config
: Configuration files which customize PyAutoLens's behaviour.dataset
: Where data is stored, including example datasets distributed with PyAutoLens.output
: Where the PyAutoLens analysis and visualization are output.slam
: The Source, Light and Mass (SLaM) lens modeling pipelines, which are advanced scripts for experienced users.
The examples in the notebooks
and scripts
folders are structured as follows:
overview
: Examples giving an overview of PyAutoLens's core features.howtolens
: Detailed step-by-step Jupyter notebook tutorials on how to use PyAutoLens.imaging
: Examples for analysing and simulating CCD imaging data (e.g. Hubble, Euclid).interferometer
: Examples for analysing and simulating interferometer datasets (e.g. ALMA, JVLA).multi
: Modeling multiple datasets simultaneously (E.g. multi-wavelength imaging, imaging and interferometry).point_source
: Modeling strong lens point source datasets.group
: Group-scale lens modeling and simulations examples.cluster
: Cluster-scale lens modeling and simulation examples (IN DEVELOPMENT FEATURE).results
: Examples using the results of a model-fit, including database tools which loads results from hard-disk.plot
: An API reference guide for PyAutoLens's plotting tools.misc
: Miscellaneous scripts for specific lens analysis.
Inside these packages are packages titled advanced
which only users familiar PyAutoLens should check out.
In the imaging
, interferometer
, point_source
, multi
, group
and cluster
folders you'll find the following
packages:
modeling
: Examples of how to fit a lens model to data via a non-linear search.simulators
: Scripts for simulating realistic imaging and interferometer data of strong lenses.preprocess
: Tools to preprocessdata
before an analysis (e.g. convert units, create masks).advanced/chaining
: Advanced modeling scripts which chain together multiple non-linear searches.advanced/chaining/pipelines
: Example pipelines for modeling strong lenses using non-linear search chaining.advanced/chaining/hyper_mode
: Examples using hyper-mode, which adapts the lens model to the data being fitted.advanced/chaining/slam
: Example scripts that fit lens datasets using the SLaM pipelines.advanced/graphical
: Advanced modeling scripts which fit multiple datasets simultaneously using a graphical model.
The files README.rst
distributed throughout the workspace describe what is in each folder.
We recommend new users begin with the example notebooks / scripts in the overview folder and the HowToLens tutorials.
This version of the workspace is built and tested for using PyAutoLens v2023.1.15.1.
Included with PyAutoLens is the HowToLens
lecture series, which provides an introduction to strong gravitational
lens modeling with PyAutoLens. It can be found in the workspace & consists of 5 chapters:
Introduction
: An introduction to strong gravitational lensing & PyAutoLens.Lens Modeling
: How to model strong lenses, including a primer on Bayesian analysis and model-fitting via a non-linear search .Search Chaining
: Chaining non-linear searches together to build model-fitting pipelines & tailor them to your own science case.Pixelizations
: How to perform pixelized reconstructions of the source-galaxy.Hyper-Mode
: How to use PyAutoLens advanced modeling features that adapt the model to the strong lens being analysed.
The imaging
, interferometer
and point_source
packages provides scripts for modeling galaxy-scale lenses,
whereas the group
package provides scripts for modeling group-scale lenses.
But what are the defitions of a galaxy scale and group scale lens? The line between the two is blurry, but is defined roughly as follows:
- A galaxy-scale lens is a system which can be modeled to a high level of accuracy using a single mass distribution
for the main lens galaxy. There are examples which include additional galaxies in the model to make small improvements on the overall lens model, but for many science cases this is not stricly necessary.
- A group scale lens is a system which cannot be modeled to a high level of accuracy using a single mass distribution.
The notion of a 'main' lens galaxy is illposed and two or more main lens galaxies are required to fit an accurate model.
If you have data which requires the lens model to include additional galaxies, whether it be a galaxy or group scale system, keep an eye out for PyAutoLens's 'clump API' which is designed to facilitate this.
To make changes in the tutorial notebooks, please make changes in the the corresponding python files(.py) present in the
scripts
folder of each chapter. Please note that marker # %%
alternates between code cells and markdown cells.
Support for installation issues, help with lens modeling and using PyAutoLens is available by raising an issue on the autolens_workspace GitHub page. or joining the PyAutoLens Slack channel, where we also provide the latest updates on PyAutoLens.
Slack is invitation-only, so if you'd like to join send an email requesting an invite.