Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 76 additions & 2 deletions GALLERY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- Generated by gallery/gallery_build.py from scripts/<domain>/images/. Do not edit by hand: rerun `bash gallery/gallery_run.sh --all`. -->

Rendered with PyAutoLens `2026.8.17.1` · 86 figures.
Rendered with PyAutoLens `2026.8.17.1` · 97 figures.

Every figure below is what the PyAutoLens visualizers (`VisualizerImaging`, `VisualizerInterferometer`, `VisualizerPoint`, `VisualizerWeak`) write to a model-fit's `image/` folder, rendered on this repo's datasets from the simulation models. For the Simple cluster, the first point source is offset by 0.003 arcsec in y. See [README.md](README.md) for how to improve one.
Most figures are outputs that the PyAutoLens visualizers (`VisualizerImaging`, `VisualizerInterferometer`, `VisualizerPoint`, `VisualizerWeak`) write to a model-fit's `image/` folder. Pandora shows 24 observed images across seven families with source-plane diagnostics from a fixed starting model. For the Simple cluster, the first point source is offset by 0.003 arcsec in y. See [README.md](README.md) for how to improve one.

## Contents

Expand All @@ -13,6 +13,16 @@ Every figure below is what the PyAutoLens visualizers (`VisualizerImaging`, `Vis
- [top level](#cluster--visualization--top-level)
- [point_0/](#cluster--visualization--point_0)
- [point_1/](#cluster--visualization--point_1)
- [cluster_pandora](#cluster_pandora)
- [visualization](#cluster_pandora--visualization) (11 figures)
- [top level](#cluster_pandora--visualization--top-level)
- [point_0/](#cluster_pandora--visualization--point_0)
- [point_1/](#cluster_pandora--visualization--point_1)
- [point_2/](#cluster_pandora--visualization--point_2)
- [point_3/](#cluster_pandora--visualization--point_3)
- [point_4/](#cluster_pandora--visualization--point_4)
- [point_5/](#cluster_pandora--visualization--point_5)
- [point_6/](#cluster_pandora--visualization--point_6)
- [group](#group)
- [visualization](#group--visualization) (2 figures)
- [top level](#group--visualization--top-level)
Expand Down Expand Up @@ -131,6 +141,70 @@ Every figure below is what the PyAutoLens visualizers (`VisualizerImaging`, `Vis

![point_solver](scripts/cluster/images/visualization/point_1/point_solver.png)

## cluster_pandora

### cluster_pandora / visualization

#### cluster_pandora / visualization / top level

##### dataset

![dataset](scripts/cluster_pandora/images/visualization/dataset.png)

##### fit

![fit](scripts/cluster_pandora/images/visualization/fit.png)

##### fit_image_with_points

![fit_image_with_points](scripts/cluster_pandora/images/visualization/fit_image_with_points.png)

##### image_with_points

![image_with_points](scripts/cluster_pandora/images/visualization/image_with_points.png)

#### cluster_pandora / visualization / point_0/

##### fit

![fit](scripts/cluster_pandora/images/visualization/point_0/fit.png)

#### cluster_pandora / visualization / point_1/

##### fit

![fit](scripts/cluster_pandora/images/visualization/point_1/fit.png)

#### cluster_pandora / visualization / point_2/

##### fit

![fit](scripts/cluster_pandora/images/visualization/point_2/fit.png)

#### cluster_pandora / visualization / point_3/

##### fit

![fit](scripts/cluster_pandora/images/visualization/point_3/fit.png)

#### cluster_pandora / visualization / point_4/

##### fit

![fit](scripts/cluster_pandora/images/visualization/point_4/fit.png)

#### cluster_pandora / visualization / point_5/

##### fit

![fit](scripts/cluster_pandora/images/visualization/point_5/fit.png)

#### cluster_pandora / visualization / point_6/

##### fit

![fit](scripts/cluster_pandora/images/visualization/point_6/fit.png)

## group

### group / visualization
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ mirroring `autolens_workspace` (a variant gets its own folder):
| `multi_galaxy` | `visualization.py` | `dataset.png` + `fit.png` |
| `group` | `visualization.py` | `dataset.png` + `fit.png` |
| `cluster` | `visualization.py` | Combined cluster figures and per-source figures, including `fit.png` (source-plane family fit), `fit_image_plane.png` and `point_solver.png` |
| `cluster_pandora` | `visualization.py` | Four cluster overviews and seven source-plane family fits on the registered [Abell 2744 HST cutout](dataset/cluster/a2744/README.md) |
| `multi_dataset` | `visualization.py` | `dataset.png` + `fit.png` per band |
| `weak` | `visualization.py` | `dataset.png` + `fit.png` |

Each figure is exactly what the visualizers (`VisualizerImaging`, `VisualizerInterferometer`,
The simulated examples show what the visualizers (`VisualizerImaging`, `VisualizerInterferometer`,
`VisualizerPoint`, `VisualizerWeak`) write to a fit's `image/` folder. The producers use the
simulation models and enable the figure settings in
[`config/visualize/plots.yaml`](config/visualize/plots.yaml). Imaging and
interferometer render every figure. Other types track a subset, as shown above. The Simple
cluster model offsets the `point_0` source y coordinate by 0.003 arcsec to demonstrate how a
small model error affects the individual images. Both family figures use this same model and
the tracked simulated positions.
the tracked simulated positions. Pandora uses the measured positions and a fixed starting mass model.

## Render locally

Expand Down
7 changes: 7 additions & 0 deletions dataset/cluster/a2744/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Pandora (Abell 2744)

The three CSVs are a snapshot of the [workspace catalogue](https://github.com/PyAutoLabs/autolens_workspace/tree/465c086eeb83b413f4ccb35a0a61a8fa34b87041/dataset/cluster/a2744). The 24 measured positions belong to seven spectroscopic families. Two individually modelled galaxies, a single NFW halo and 188 luminosity-scaled members provide the starting lens model. Each source centre is solved analytically. The mass parameters are fixed. The four overviews and seven family diagnostics use the same 0.5″ positional uncertainty as the workspace.

The cached 600 × 600 H-band [CDS hips2fits cutout](data.fits) keeps the gallery reproducible offline. Its SHA-256 is `f8f7161b84c04f2488c386bba728849648afb22bc63ef26f1a13bfbd6f0da72c`. The accompanying workspace loader uses its FITS reference pixel and axis directions to align the image with the east-positive, north-positive catalogue. When refreshing the dataset, copy the loader and its inputs together.

Credit the multiple-image and member catalogues to Bergamini et al. (2023, A&A 670, A60) and the Hubble Frontier Fields imaging to Lotz et al. (2017).
Binary file added dataset/cluster/a2744/data.fits
Binary file not shown.
4 changes: 4 additions & 0 deletions dataset/cluster/a2744/mass.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
galaxy,attr_name,profile_class,y,x,sigma,r_core,r_cut,mass_at_200,redshift_object,redshift_source,H0,Om0,redshift
lens_0,mass,dPIEMassSph,-30.7476,14.0880,290.0,0.0,20.0,,0.308,5.662,67.66,0.30966,0.308
lens_1,mass,dPIEMassSph,-10.6992,-3.8597,290.0,0.0,20.0,,0.308,5.662,67.66,0.30966,0.308
host_halo,dark,NFWMCRLudlowSph,-30.7476,14.0880,,,,2000000000000000.0,0.308,5.662,,,0.308
37 changes: 37 additions & 0 deletions dataset/cluster/a2744/pandora_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""Read the Pandora HST cutout in the east/north frame of point_datasets.csv."""

import numpy as np
from astropy.io import fits
from astropy.wcs import WCS

import autolens as al


def image_from_fits(path):
"""Place each HST pixel at its catalogue offset from the A2744 core."""
pixels, header = fits.getdata(path, header=True)
wcs = WCS(header).celestial
matrix = wcs.pixel_scale_matrix * 3600.0
if (
pixels.ndim != 2
or list(wcs.wcs.ctype) != ["RA---TAN", "DEC--TAN"]
or wcs.has_distortion
or not np.allclose(wcs.wcs.crval, (3.5875, -30.3972), rtol=0, atol=1e-8)
or not np.allclose(matrix, np.diag(np.diag(matrix)), rtol=0, atol=1e-10)
):
raise ValueError(f"Expected an axis-aligned TAN cutout centred on the Pandora catalogue: {path}")

dx, dy = np.diag(matrix)
# Array2D columns increase east and its first row is the northern edge.
# FITS CRPIX is one-based and need not coincide with the array midpoint.
if dx < 0:
pixels = pixels[:, ::-1]
if dy > 0:
pixels = pixels[::-1, :]
centre_y, centre_x = (np.asarray(pixels.shape) - 1) / 2
ref_x, ref_y = wcs.wcs.crpix - 1
return al.Array2D.no_mask(
values=pixels.copy(),
pixel_scales=(abs(dy), abs(dx)),
origin=((centre_y - ref_y) * dy, (centre_x - ref_x) * dx),
)
25 changes: 25 additions & 0 deletions dataset/cluster/a2744/point_datasets.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name,y,x,positions_noise,redshift
point_0,-27.0828,29.7224,0.5,1.688
point_0,-32.1948,27.6202,0.5,1.688
point_0,-46.4400,-5.4402,0.5,1.688
point_1,-22.1004,-13.1503,0.5,1.887
point_1,1.7568,30.3962,0.5,1.887
point_1,-9.6408,-6.6170,0.5,1.887
point_1,-17.7372,-3.3784,0.5,1.887
point_2,-19.6560,14.3644,0.5,3.577
point_2,-15.9588,25.3814,0.5,3.577
point_2,-42.2856,-21.8850,0.5,3.577
point_2,-28.5012,19.0997,0.5,3.577
point_3,-16.5312,34.2838,0.5,2.017
point_3,-38.8764,20.3635,0.5,2.017
point_3,-43.7868,-3.3132,0.5,2.017
point_4,-26.1792,-35.3241,0.5,5.662
point_4,5.6520,2.7232,0.5,5.662
point_4,5.9652,10.0296,0.5,5.662
point_5,-51.8688,1.3166,0.5,5.284
point_5,-25.9740,38.9633,0.5,5.284
point_5,-42.4404,28.2319,0.5,5.284
point_6,-35.7912,-16.4138,0.5,5.662
point_6,-35.3952,16.5690,0.5,5.662
point_6,-22.4172,5.1328,0.5,5.662
point_6,-3.8628,35.1812,0.5,5.662
189 changes: 189 additions & 0 deletions dataset/cluster/a2744/scaling_galaxies.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
y,x,luminosity
19.9656,22.6551,0.77268
5.6952,71.9336,0.69183
-43.1604,-24.3381,0.60814
10.5156,-6.5643,0.58076
2.7864,0.4534,0.49204
-26.6796,15.5567,0.42073
32.1840,-65.6613,0.36308
-22.2300,-27.9121,0.35975
-4.2516,-39.1247,0.34356
-7.6680,17.0720,0.31046
46.1592,17.9756,0.30200
26.4996,5.3408,0.29107
38.7036,-53.8027,0.28576
-7.8876,-2.9219,0.27542
-41.8644,-42.0901,0.27290
7.6500,2.0246,0.27290
35.2944,5.2291,0.27040
9.1836,-7.1294,0.24889
-4.9356,-16.5845,0.23121
-1.1988,35.6128,0.22909
34.7580,-6.7878,0.22699
-10.5264,52.2936,0.21281
44.4852,55.6720,0.21086
-4.1580,2.7480,0.20701
-18.7416,-77.5974,0.19953
4.0428,3.6641,0.19588
23.0112,-20.3293,0.18197
36.3852,-68.1764,0.18030
24.3504,-49.6605,0.17701
74.4588,-18.4259,0.17061
29.1060,22.3818,0.16444
22.5396,8.8248,0.16444
43.8984,2.0059,0.15849
0.3204,-26.8160,0.14191
-13.1472,1.3601,0.13932
-32.4468,26.1049,0.13305
60.4656,24.5275,0.13183
-22.6008,60.5875,0.13062
-65.3940,43.0217,0.13062
-12.9888,55.1659,0.12942
42.7896,15.6716,0.11803
11.7648,-18.9755,0.11695
-38.1852,13.1068,0.10864
45.0720,-11.7561,0.10471
-44.5428,5.0738,0.10471
33.0552,34.9763,0.10375
-48.6792,4.0895,0.10280
11.0916,-26.5551,0.10000
52.2072,8.6261,0.09462
-11.3400,21.6211,0.09204
-53.8704,-55.6161,0.08710
24.2568,20.9255,0.08551
30.6432,24.8597,0.08551
15.5628,-7.8063,0.08241
-27.8928,-1.4315,0.08017
27.7236,6.2724,0.07727
-30.0816,32.1661,0.07447
52.7148,1.6706,0.07112
17.9856,-22.1303,0.06855
-46.0296,-15.5040,0.06668
0.1584,-6.1451,0.06668
40.4064,-42.7422,0.06546
39.1932,-43.8352,0.06081
-7.4160,-10.8959,0.06081
42.7896,-57.8270,0.05970
54.7056,-51.6664,0.05916
-20.6352,55.1938,0.05808
8.2944,41.3915,0.05808
-30.2112,59.9199,0.05808
46.6704,-56.5042,0.05649
64.8000,31.4644,0.05200
-60.3756,-5.5613,0.04831
36.3600,-28.4182,0.04742
-43.7976,23.6736,0.04656
-22.0140,-7.6542,0.04656
-6.8724,-27.6637,0.04446
-20.4732,-9.6973,0.03873
44.0640,52.4799,0.03837
-36.7236,8.6323,0.03565
22.9068,19.8263,0.03436
-17.2080,2.0028,0.03404
0.7632,45.6455,0.03281
57.1752,-28.0425,0.03192
-12.0024,-45.6145,0.03162
-1.3356,47.2447,0.03076
27.8496,-28.4213,0.02965
11.7936,-66.7449,0.02965
65.9880,-30.9148,0.02606
-17.7480,22.7669,0.02512
-25.3908,1.4625,0.02489
24.6636,17.5937,0.02443
-11.9268,28.7443,0.02443
-36.9396,-43.7824,0.02168
-10.4004,-26.1639,0.02089
31.2588,27.1886,0.02014
-44.3016,-11.3928,0.01977
-46.8792,6.8965,0.01959
67.2336,-38.3795,0.01941
32.5548,-51.0454,0.01888
3.0384,16.6870,0.01888
-6.5052,-6.5549,0.01786
-17.6472,3.1020,0.01738
19.6020,-9.7098,0.01660
41.4540,-42.8726,0.01600
-4.1112,-9.4458,0.01294
2.3688,-13.0043,0.01259
-27.6660,42.6770,0.01191
4.1544,30.4241,0.01148
-43.2864,19.3761,0.01117
-5.2596,44.5805,0.01076
34.5780,18.5625,0.01057
-13.2516,-62.5313,0.01000
-31.3164,22.2825,0.00991
46.6812,-27.2103,0.00973
-6.9192,50.7100,0.00938
35.7840,-44.9779,0.00887
-23.2992,-39.5036,0.00887
-57.2724,14.2743,0.00871
-10.1664,18.3638,0.00839
-9.0036,-14.2898,0.00839
51.2280,17.1559,0.00832
-6.8580,-18.2644,0.00824
66.7296,21.3261,0.00817
8.0532,-57.2960,0.00787
-45.9504,30.9738,0.00787
9.2376,-54.3989,0.00752
45.8712,34.9297,0.00752
-9.9756,25.6236,0.00745
-32.0652,16.1995,0.00724
4.4316,-47.9185,0.00718
22.7880,-7.7846,0.00711
-40.4424,-4.8471,0.00685
45.2628,-2.0742,0.00667
37.7388,11.5542,0.00655
4.1184,-9.4055,0.00643
41.6196,7.2288,0.00603
-60.8472,-21.3820,0.00603
-44.3880,41.3294,0.00592
-16.4556,4.1950,0.00581
36.4752,63.9317,0.00575
-41.5980,-63.1554,0.00565
-39.5856,-30.8806,0.00555
16.5024,54.8709,0.00535
-25.3116,6.0022,0.00479
-49.2948,10.5233,0.00474
44.5932,-30.9862,0.00470
-54.4104,-7.4772,0.00466
-58.1256,4.2789,0.00461
23.3064,63.6181,0.00461
-27.4500,33.1691,0.00457
10.1124,-23.6953,0.00457
54.3564,19.0500,0.00453
24.8508,-31.6289,0.00433
25.3188,57.2277,0.00421
11.1924,-24.4499,0.00413
36.0648,-43.1614,0.00409
12.8412,-46.0492,0.00406
-21.8700,27.7724,0.00406
20.2464,8.1013,0.00394
-9.4536,-8.6043,0.00387
50.7672,34.6502,0.00370
-44.9352,24.8939,0.00356
52.9164,42.9192,0.00353
24.2136,-17.4447,0.00350
-5.0220,-11.0822,0.00347
29.8476,-10.6103,0.00344
-32.8176,3.1610,0.00340
-35.2944,-3.1672,0.00319
-53.6508,15.5164,0.00316
62.9856,-49.1357,0.00316
5.9976,30.1788,0.00313
-0.1080,61.1278,0.00313
-62.7192,-33.4982,0.00313
-36.8496,-18.3048,0.00308
-58.6656,-36.7617,0.00299
19.9044,54.4734,0.00291
59.0472,-53.4581,0.00291
51.3540,-51.7595,0.00283
-12.2472,31.7562,0.00278
-41.8968,-14.4016,0.00275
60.4620,-36.3487,0.00270
-25.2324,3.1362,0.00268
-30.7440,-29.2100,0.00261
-17.3628,-59.2709,0.00251
0.0612,-39.2272,0.00251
-9.9180,-55.9391,0.00244
63.9972,-26.8626,0.00233
-18.1656,29.9987,0.00215
Loading
Loading