Skip to content

feat: plot_magnification_2d — image-plane magnification map with constant-mu contours - #690

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/magnification-maps-image-plane
Nov 2, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/magnification-maps-image-plane

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Closes #689 (cluster arc phase 8a). Adds a standalone image-plane magnification map. Until now the magnification was only a linear-scale panel in the fit subplots, where the divergences at the critical curves swamp the colour range. plot_magnification_2d plots log10 |mu| for any mass object, with labelled contours of constant |mu| and the critical curves, in the style of LEGGOS II figure 4.

API Changes

New public plot function autogalaxy.plot.plot_magnification_2d(mass_obj, grid, ...); no existing behaviour changes.
See full details below.

Test Plan

  • test_autogalaxy full suite: 1469 passed
  • New tests: output file written; contours drawn only at the in-range |mu| levels; no contours when contour_levels=None
  • Rendered a two-galaxy + shear map and checked contours line up with the image and critical curves
Full API Changes (for automation & release notes)

Added

  • autogalaxy.plot.plot_magnification_2d(mass_obj, grid, contour_levels=(2, 5, 10, 20, 50, 100), include_critical_curves=True, tangential_critical_curves=None, radial_critical_curves=None, vmin=None, vmax=None, title=..., colormap="default", output_path=None, output_filename="magnification_2d", output_format=None, ax=None) — log10 |mu| image-plane map; colour range defaults to the 1st/99th percentiles; contour levels outside the map's range are skipped; draws into ax when given (caller saves).

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

…u contours

Plots log10 |mu| for any mass object (Galaxy, Galaxies, Tracer) with a
percentile colour range, labelled contours at constant |mu| and an optional
critical-curve overlay, as in LEGGOS II figure 4 (arc phase 8a, #689).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211

Copy link
Copy Markdown
Collaborator Author

Downstream: PyAutoLabs/PyAutoLens#815 (aplt export), workspace PyAutoLabs/autolens_workspace#614. Merge order: this → PyAutoLens#815 → autolens_workspace#614.

@Jammy2211
Jammy2211 merged commit 467a5ed into main Nov 2, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/magnification-maps-image-plane branch November 2, 2026 14:08
@pyautolabs-bot pyautolabs-bot Bot removed the pending-release PR queued for the next release build label Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: image-plane magnification map with constant-mu contours (arc 8a)

1 participant