Skip to content

feat: cluster-scale visualization — per-plane critical curves/caustics aplt helpers#578

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cluster-visualization
Jul 9, 2026
Merged

feat: cluster-scale visualization — per-plane critical curves/caustics aplt helpers#578
Jammy2211 merged 1 commit into
mainfrom
feature/cluster-visualization

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds cluster-scale visualization to the library: a new autolens/cluster/plot/ package of module-level aplt helpers (the autolens/weak/plot/ pattern), promoted from the raw-matplotlib prototype in autolens_workspace_test/scripts/cluster/visualization.py. The headline capability is per-source-plane critical curves and caustics for multi-plane tracers: at cluster scale every source redshift has its own curve set (D_LS/D_S differs per plane), which the galaxy-scale single-plane defaults cannot express.

API Changes

Added five aplt-level plotting helpers (plot_positions_overlay, plot_image_group_zooms, plot_critical_curves, plot_caustics, subplot_cluster_dataset) plus the WONG_PALETTE / CLUSTER_CMAP constants in autolens.cluster.plot.cluster_plots. Purely additive — no existing symbol changes.
See full details below.

Test Plan

  • test_autolens/cluster/plot/test_cluster_plots.py — 6 tests: one per helper (plot_patch save assertions) plus a physics test asserting the z=2 plane's tangential critical curve is larger than the z=1 plane's (the reason per-plane curves exist).
  • Full PyAutoLens suite (count in issue).
  • Companion integration script run end-to-end (autolens_workspace_test PR).

Validation checklist (--auto run — in-session directives)

Full API Changes (for automation & release notes)

Added

  • aplt.plot_positions_overlay(positions_list, image=, pixel_scales=, centres=, halo_centres=, redshift=, cosmology=, kpc_scale_bar=, ax=, ...) — full-field per-source-coloured multiple-image positions with conventional cluster markers and a physical scale bar.
  • aplt.plot_image_group_zooms(positions_list, image, zoom_arcsec=, max_cols=, ...) — one zoom panel per observed multiple image, colour-framed by source.
  • aplt.plot_critical_curves(tracer, grid, image=, plane_indices=, include_radial=, ax=, ...) — tangential (+ radial) critical curves of every source plane via the multi-plane LensCalc (use_multi_plane=True, plane_j=j); numpy path only (contour solvers are not vmap-safe), grid-resolution guidance in the docstring.
  • aplt.plot_caustics(tracer, grid, plane_indices=, include_radial=, ax=, ...) — the per-plane caustics in source-plane coordinates (radial on by default — it bounds the central demagnified-image region).
  • aplt.subplot_cluster_dataset(positions_list, image=, tracer=, grid=, ...) — positions overlay | per-plane critical curves mosaic.
  • autolens.cluster.plot.cluster_plots.WONG_PALETTE, CLUSTER_CMAP — the shared per-source palette / colormap constants.

Migration

  • None required (additive). The raw-matplotlib patterns in the old workspace_test prototype are superseded by these helpers.

🤖 Generated with Claude Code

…s aplt helpers

New autolens/cluster/plot/ package (weak/plot pattern), re-exported into aplt:
plot_positions_overlay, plot_image_group_zooms, plot_critical_curves,
plot_caustics, subplot_cluster_dataset. Headline: tangential/radial critical
curves and caustics for EVERY source plane of a multi-plane tracer via
LensCalc(use_multi_plane=True, plane_j=j) — each source redshift has its own
curve set, which galaxy-scale single-plane defaults cannot express. Cluster
figure conventions (percentile LogNorm, Wong palette per source, kpc scale
bar, grid-resolution guidance) promoted from the workspace_test prototype.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PUuWXiS23FvmfQPLvMNjeM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant