Skip to content

Commit 3ab490a

Browse files
authored
Merge pull request #654 from PyAutoLabs/claude/pyautolens-doc-reorganization-w6a1l5
docs: RTD three-regime remainder — api regime notes, cookbook recipes, flagships
2 parents 432bab7 + 17f3889 commit 3ab490a

6 files changed

Lines changed: 86 additions & 6 deletions

File tree

docs/api/galaxy.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,20 @@ The ``Redshift`` object does not need to be used for general **PyAutoGalaxy** us
3333
:template: custom-class-template.rst
3434
:recursive:
3535

36-
Redshift
36+
Redshift
37+
38+
Galaxy Catalogues (CSV)
39+
-----------------------
40+
41+
Load many galaxies from a ``y, x, luminosity`` CSV catalogue — the input format of the
42+
scaling-relation galaxy tier used at multi-galaxy, group and cluster scale (see the
43+
``multi_galaxy``, ``group`` and ``cluster`` packages of the ``autolens_workspace``).
44+
``galaxy_table_from_csv`` reads the catalogue; the two ``*_from_csv_tables`` functions
45+
build instances or model components from it.
46+
47+
.. autosummary::
48+
:toctree: _autosummary
49+
50+
galaxy_table_from_csv
51+
galaxies_from_csv_tables
52+
galaxy_af_models_from_csv_tables

docs/api/mass.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ Mass Profiles
55
Total [ag.mp]
66
-------------
77

8+
The ``Isothermal`` / ``PowerLaw`` family are the standard **untruncated** profiles for
9+
galaxy-scale and multi-galaxy lenses (no host halo, so no tidal truncation). The ``dPIE``
10+
family are **tidally truncated** profiles for the member galaxies of group- and
11+
cluster-scale lenses, whose ``r_cut`` encodes stripping by the host halo's potential
12+
(``dPIEMass`` is parameterized by Lenstool's native ``sigma`` — the fiducial dispersion
13+
sigma_LT; ``dPIEMassB0`` by the deflection normalization ``b0``).
14+
815
.. currentmodule:: autogalaxy.profiles.mass
916

1017
.. autosummary::

docs/api/point.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Point sources arise when the background object is compact (e.g. a quasar, supern
66
compact radio source) and is modelled by its image-plane positions, flux ratios, and/or
77
time delays rather than by a resolved surface-brightness distribution.
88

9+
They are also the standard source strategy of **cluster-scale** lens modeling, where each
10+
of many background sources contributes its multiple-image positions (each at its own
11+
redshift, ray-traced multi-plane) — see the ``cluster`` package of the ``autolens_workspace``.
12+
913
Dataset
1014
-------
1115

docs/general/model_cookbook.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,52 @@ as manually customize it in the .json file directory.
365365

366366
This is used for composing complex models of group scale lenses.
367367

368+
## Multi Galaxy, Group and Cluster Models
369+
370+
Above galaxy scale, models are composed for three regimes (see the New User Guide's "What Scale
371+
System?" ladder — all groups and clusters are multi-galaxy systems, but not vice versa):
372+
373+
**Multi-galaxy lenses** (2+ co-dominant deflectors, no host halo): one free light + mass model per
374+
deflector, composed in a loop with **untruncated** isothermals (no host halo means no tidal
375+
truncation):
376+
377+
```python
378+
lens_dict = {}
379+
380+
for i, centre in enumerate(main_lens_centres):
381+
mass = af.Model(al.mp.Isothermal)
382+
mass.centre = (centre[0], centre[1])
383+
384+
lens_dict[f"lens_{i}"] = af.Model(al.Galaxy, redshift=0.5, mass=mass)
385+
386+
model = af.Collection(galaxies=af.Collection(**lens_dict, source=source))
387+
```
388+
389+
**Group-scale lenses** add two things as explicit modelling choices: an optional dark-matter
390+
**group halo**, and faint members whose masses are tied to their luminosities through a shared
391+
scaling relation, so N galaxies cost one free parameter (composed via prior arithmetic on a
392+
shared prior):
393+
394+
```python
395+
einstein_radius_ref = af.UniformPrior(lower_limit=0.0, upper_limit=1.0)
396+
397+
for i, (centre, luminosity) in enumerate(zip(centres, luminosities)):
398+
mass = af.Model(al.mp.IsothermalSph)
399+
mass.centre = (centre[0], centre[1])
400+
mass.einstein_radius = einstein_radius_ref * (luminosity / reference_luminosity) ** 0.5
401+
```
402+
403+
**Cluster-scale lenses** keep the group mass framework (halo + tidally truncated ``dPIE``
404+
members on scaling relations) but change the source strategy: many point-source multiple-image
405+
position datasets, each at its own redshift, fitted via ``AnalysisPoint``.
406+
407+
The following example notebooks show each regime's full model composition:
408+
409+
<https://github.com/PyAutoLabs/autolens_workspace/blob/main/notebooks/multi_galaxy/modeling.ipynb>
410+
<https://github.com/PyAutoLabs/autolens_workspace/blob/main/notebooks/group/start_here.ipynb>
411+
<https://github.com/PyAutoLabs/autolens_workspace/blob/main/notebooks/group/features/group_halo/modeling.ipynb>
412+
<https://github.com/PyAutoLabs/autolens_workspace/blob/main/notebooks/cluster/start_here.ipynb>
413+
368414
## Many Profile Models (Advanced)
369415

370416
Features such as the Multi Gaussian Expansion (MGE) and shapelets compose models consisting of 50 - 500+ light

docs/overview/overview_1_start_here.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ progressively improving the quality of the fit until the model closely reproduce
352352

353353
**Credit: Amy Etherington**
354354

355-
The next documentation page guides you through lens modeling for a variety of lensing regimes (e.g. galaxy–galaxy lenses,
356-
cluster-scale lenses) and data types (e.g. CCD imaging, interferometer data).
355+
The next documentation page guides you through lens modeling for a variety of lensing regimes (galaxy-scale,
356+
multi-galaxy, group-scale and cluster-scale lenses) and data types (e.g. CCD imaging, interferometer data).
357357

358358
## Simulations
359359

@@ -364,15 +364,16 @@ Simulating strong lenses is often essential, for example to:
364364
- Test lensing theory in a fully controlled environment.
365365

366366
The next documentation page guides you through how to simulate lenses for different types of strong
367-
lenses (e.g. galaxy–galaxy lenses, cluster-scale lenses) and different types of data (e.g. CCD imaging, interferometer data).
367+
lenses (galaxy-scale, multi-galaxy, group-scale and cluster-scale) and different types of data (e.g. CCD imaging,
368+
interferometer data).
368369

369370
## Wrap Up
370371

371372
This completes the introduction to **PyAutoLens**, including a brief overview of the core API for lensing calculations,
372373
lens modeling, and data simulation.
373374

374-
Different users will be interested in strong lenses across different lensing regimes (e.g. galaxy-scale or
375-
cluster-scale lenses) and using different data types (e.g. CCD imaging or interferometer data).
375+
Different users will be interested in strong lenses across different lensing regimes (galaxy-scale, multi-galaxy,
376+
group-scale or cluster-scale lenses) and using different data types (e.g. CCD imaging or interferometer data).
376377

377378
The autolens_workspace repository contains a wide range of examples and tutorials covering these use cases. The
378379
next documentation page helps new users identify the most appropriate starting point based on their scientific goals.

docs/overview/overview_2_new_user_guide.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ but not vice versa. What changes as you climb is first the mass model, then the
3939
reconstructing extended sources, and the lens galaxies' light is not modeled. If you are interested in clusters, go
4040
to the [cluster/start_here.ipynb](https://github.com/PyAutoLabs/autolens_workspace/blob/main/notebooks/cluster/start_here.ipynb) notebook.
4141

42+
For a sense of the real science each rung anchors to: multi-galaxy lenses include merging-pair systems like
43+
SDSS J1011+0143 (two SIEs + shear; Shu et al. 2016) and the famous time-delay lens B1608+656; group-scale
44+
lenses include CSWA 19 (Ding et al. 2025, modeled with **PyAutoLens**) and the SL2S group sample; cluster-scale
45+
lenses include the Hubble Frontier Fields clusters, most notably Abell 2744 (Bergamini et al. 2023) — the
46+
system the workspace's cluster `start_here` models.
47+
4248
## What Dataset Type?
4349

4450
If you are interested in galaxy-scale strong lenses, you now need to decide what type of strong lens data you are

0 commit comments

Comments
 (0)