feat: cluster-scale visualization — per-plane critical curves/caustics aplt helpers#578
Merged
Merged
Conversation
…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
This was referenced Jul 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds cluster-scale visualization to the library: a new
autolens/cluster/plot/package of module-level aplt helpers (theautolens/weak/plot/pattern), promoted from the raw-matplotlib prototype inautolens_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 theWONG_PALETTE/CLUSTER_CMAPconstants inautolens.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).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-planeLensCalc(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
🤖 Generated with Claude Code