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
14 changes: 11 additions & 3 deletions GALLERY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- 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` · 66 figures.
Rendered with PyAutoLens `2026.8.17.1` · 68 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 with the true model. See [README.md](README.md) for how to improve one.

Expand Down Expand Up @@ -38,10 +38,10 @@ Every figure below is what the PyAutoLens visualizers (`VisualizerImaging`, `Vis
- [visualization](#multi_galaxy--visualization) (2 figures)
- [top level](#multi_galaxy--visualization--top-level)
- [point_source_image_chi_squared](#point_source_image_chi_squared)
- [visualization](#point_source_image_chi_squared--visualization) (3 figures)
- [visualization](#point_source_image_chi_squared--visualization) (4 figures)
- [top level](#point_source_image_chi_squared--visualization--top-level)
- [point_source_source_chi_squared](#point_source_source_chi_squared)
- [visualization](#point_source_source_chi_squared--visualization) (3 figures)
- [visualization](#point_source_source_chi_squared--visualization) (4 figures)
- [top level](#point_source_source_chi_squared--visualization--top-level)
- [weak](#weak)
- [visualization](#weak--visualization) (2 figures)
Expand Down Expand Up @@ -351,6 +351,10 @@ Every figure below is what the PyAutoLens visualizers (`VisualizerImaging`, `Vis

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

##### fit_image_with_points

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

##### image_with_points

![image_with_points](scripts/point_source_image_chi_squared/images/visualization/image_with_points.png)
Expand All @@ -369,6 +373,10 @@ Every figure below is what the PyAutoLens visualizers (`VisualizerImaging`, `Vis

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

##### fit_image_with_points

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

##### image_with_points

![image_with_points](scripts/point_source_source_chi_squared/images/visualization/image_with_points.png)
Expand Down
4 changes: 2 additions & 2 deletions _viz_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def keep_dataset_and_fit(
plotter's ``dataset_point.png``); they are renamed to ``dataset.png`` / ``fit.png``. Every
other file (other PNGs, FITS, CSV, JSON) and any sub-folder is deleted, so the newer
domains track only the two figures. ``extra_pngs`` names further figures to keep under their
own names (e.g. the point plotter's ``image_with_points.png``). Raises if any expected figure
is missing.
own names (e.g. the point plotter's ``image_with_points.png`` and
``fit_image_with_points.png``). Raises if any expected figure is missing.
"""
image_dir = Path(image_dir)
kept = []
Expand Down
22 changes: 17 additions & 5 deletions gallery/viz_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rendered_with:
autogalaxy: 2026.8.17.1
autoarray: 2026.8.17.1
autofit: 2026.8.17.1
figure_count: 66
figure_count: 68
figures:
- file: scripts/cluster/images/visualization/point_0/dataset.png
producer: scripts/cluster/visualization.py
Expand Down Expand Up @@ -370,12 +370,18 @@ figures:
source: ''
bytes: 28952
sha256: 6b52412bb75eab16a3dc4ae4e0a4925d5f23c2ff7ed8bb9a6199f406f201cfed
- file: scripts/point_source_image_chi_squared/images/visualization/fit_image_with_points.png
producer: scripts/point_source_image_chi_squared/visualization.py
domain: point_source_image_chi_squared
source: ''
bytes: 78338
sha256: 76b4b2b2ce69bcc2f3d3740c901d04d86ba245f217e5f026f1bbdfc3b9db39bd
- file: scripts/point_source_image_chi_squared/images/visualization/image_with_points.png
producer: scripts/point_source_image_chi_squared/visualization.py
domain: point_source_image_chi_squared
source: ''
bytes: 78200
sha256: 5972b44e38db7c42e93a108d53530b83a1103cde5a06989c5947eb9e86871114
bytes: 66518
sha256: 2653419882e5f55d2afe24b067e8d5c9865081aee51517dc05520a12d1787468
- file: scripts/point_source_source_chi_squared/images/visualization/dataset.png
producer: scripts/point_source_source_chi_squared/visualization.py
domain: point_source_source_chi_squared
Expand All @@ -388,12 +394,18 @@ figures:
source: ''
bytes: 28823
sha256: caf49de216f6f80553e6c79b03231fd51ee626bd5939dd6864489e56a134320c
- file: scripts/point_source_source_chi_squared/images/visualization/fit_image_with_points.png
producer: scripts/point_source_source_chi_squared/visualization.py
domain: point_source_source_chi_squared
source: ''
bytes: 75775
sha256: 4fee595525a08c3f70f79c7d5e4395b69734c3582d3ddd4343b64a5c210a4f23
- file: scripts/point_source_source_chi_squared/images/visualization/image_with_points.png
producer: scripts/point_source_source_chi_squared/visualization.py
domain: point_source_source_chi_squared
source: ''
bytes: 75639
sha256: 76c6fa188a4bb9ca4d66fe95e42429ec7d9c900df85de0e00bae345be68146a0
bytes: 66518
sha256: 2653419882e5f55d2afe24b067e8d5c9865081aee51517dc05520a12d1787468
- file: scripts/weak/images/visualization/dataset.png
producer: scripts/weak/visualization.py
domain: weak
Expand Down
3 changes: 2 additions & 1 deletion scripts/misc/simulators/point_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
of one point source (``point_0``) behind an isothermal lens — and writes
``point_dataset.json`` (the ``PointDataset``, positions only) and ``tracer.json`` into
``dataset/point_source/simple/``, plus the accompanying imaging (``data.fits``, ``psf.fits``,
``noise_map.fits``) the producers plot the positions over (``image_with_points.png``).
``noise_map.fits``) the producers plot the positions over (``image_with_points.png`` and
``fit_image_with_points.png``).

The imaging places one unlensed ``al.lp.PointSource`` per noisy image position on an
image-plane galaxy at the lens redshift (a delta function is not lensed: its multiple images
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions scripts/point_source_image_chi_squared/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
scripts/point_source_image_chi_squared/images/visualization/
dataset.png <- visualize_before_fit (the plotter writes dataset_point.png; renamed)
fit.png <- visualize(quick_update=True)
image_with_points.png <- visualize(quick_update=True): the observed positions and the
model's positions + critical curves over ``data.fits``
image_with_points.png <- visualize_before_fit: the observed positions over
``data.fits`` (dataset only, no model)
fit_image_with_points.png <- visualize(quick_update=True): the observed
positions, the model's positions and critical curves over
``data.fits``

Every other file the visualizer writes is deleted: this domain tracks only these three
figures. ``image_with_points.png`` is written before and after the fit to the same file;
the kept one is the after-fit version, with the model positions.
Every other file the visualizer writes is deleted: this domain tracks only these four
figures.

Dataset: ``dataset/point_source/simple`` (four image-plane positions, 5 mas noise; shared by
both point-source chi-squared producers), from
Expand Down Expand Up @@ -70,8 +72,8 @@ def _repo_root() -> Path:
dataset = al.from_json(file_path=dataset_path / "point_dataset.json")

"""
The accompanying imaging, used only for visualization (``image_with_points.png``), not in the
likelihood.
The accompanying imaging, used only for visualization (``image_with_points.png``,
``fit_image_with_points.png``), not in the likelihood.
"""
data = al.Array2D.from_fits(
file_path=dataset_path / "data.fits", hdu=0, pixel_scales=tm.IMAGE_PIXEL_SCALES
Expand Down Expand Up @@ -130,7 +132,9 @@ def _repo_root() -> Path:
quick_update=True,
)
keep_dataset_and_fit(
image_path, dataset_png="dataset_point.png", extra_pngs=("image_with_points.png",)
image_path,
dataset_png="dataset_point.png",
extra_pngs=("image_with_points.png", "fit_image_with_points.png"),
)
print(f"visualize: {time.perf_counter() - t0:.1f}s")
print(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions scripts/point_source_source_chi_squared/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
scripts/point_source_source_chi_squared/images/visualization/
dataset.png <- visualize_before_fit (the plotter writes dataset_point.png; renamed)
fit.png <- visualize(quick_update=True)
image_with_points.png <- visualize(quick_update=True): the observed positions and the
model's positions + critical curves over ``data.fits``
image_with_points.png <- visualize_before_fit: the observed positions over
``data.fits`` (dataset only, no model)
fit_image_with_points.png <- visualize(quick_update=True): the observed
positions and critical curves over ``data.fits`` (a
source-plane fit has no image-plane model positions)

Every other file the visualizer writes is deleted: this domain tracks only these three
figures. ``image_with_points.png`` is written before and after the fit to the same file;
the kept one is the after-fit version, with the model positions.
Every other file the visualizer writes is deleted: this domain tracks only these four
figures.

Dataset: ``dataset/point_source/simple`` (four image-plane positions, 5 mas noise; shared by
both point-source chi-squared producers), from
Expand Down Expand Up @@ -70,8 +72,8 @@ def _repo_root() -> Path:
dataset = al.from_json(file_path=dataset_path / "point_dataset.json")

"""
The accompanying imaging, used only for visualization (``image_with_points.png``), not in the
likelihood.
The accompanying imaging, used only for visualization (``image_with_points.png``,
``fit_image_with_points.png``), not in the likelihood.
"""
data = al.Array2D.from_fits(
file_path=dataset_path / "data.fits", hdu=0, pixel_scales=tm.IMAGE_PIXEL_SCALES
Expand Down Expand Up @@ -131,7 +133,9 @@ def _repo_root() -> Path:
quick_update=True,
)
keep_dataset_and_fit(
image_path, dataset_png="dataset_point.png", extra_pngs=("image_with_points.png",)
image_path,
dataset_png="dataset_point.png",
extra_pngs=("image_with_points.png", "fit_image_with_points.png"),
)
print(f"visualize: {time.perf_counter() - t0:.1f}s")
print(
Expand Down
Loading