Repository navigation
feat: source-plane magnification maps — mesh and square-pixel - #691
Merged
Merged
Conversation
LensCalc.source_plane_magnification_from traces image sub-pixels and bins the image area into square source pixels; plot_magnification_source_plane colours a reconstruction's mesh by Mapper.mesh_magnification; plot_magnification_source_plane_grid plots the square-pixel map with constant-mu contours. Also drops the stray config colour-bar unit from plot_magnification_2d. Arc phase 8b (PyAutoArray#673). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
Collaborator
Author
|
Downstream: PyAutoLabs/PyAutoLens#816, workspace PyAutoLabs/autolens_workspace#615. |
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
Cluster arc phase 8b (PyAutoArray#673). The source-plane counterpart of 8a's image-plane map: how much the lens magnifies each region of the source, summed over all of its images.
plot_magnification_source_plane(mapper, mass_obj=...)— a pixelized source's mesh coloured byMapper.mesh_magnification(log colour scale, caustics overlaid).LensCalc.source_plane_magnification_from(mask, ...)+plot_magnification_source_plane_grid(mass_obj, grid, ...)— the same map on square source pixels for parametric / MGE sources: image sub-pixels are traced and their area binned per source pixel.plot_magnification_2dshowed the config's brightness unit ("e- s^-1") on its colour bar; all three maps now passcb_unit="".Depends on PyAutoLabs/PyAutoArray#674 — merge that first.
API Changes
Three new public functions (one
LensCalcmethod, two plot functions);plot_magnification_2d's colour bar no longer shows a unit.See full details below.
Test Plan
test_autogalaxyfull suite: 1473 passed (with PyAutoArray#674)Full API Changes (for automation & release notes)
Added
LensCalc.source_plane_magnification_from(mask, source_shape_native=(50, 50), source_extent=None, sub_size=16) -> Array2Dautogalaxy.plot.plot_magnification_source_plane(mapper, mass_obj=None, grid=None, include_caustics=True, tangential_caustics=None, radial_caustics=None, vmin=None, vmax=None, title=..., colormap="default", output_path=None, output_filename="magnification_source_plane", output_format=None, ax=None)autogalaxy.plot.plot_magnification_source_plane_grid(mass_obj, grid, source_shape_native=(50, 50), source_extent=None, sub_size=16, contour_levels=(2, 5, 10, 20, 50, 100), include_caustics=True, ..., ax=None)Changed
plot_magnification_2d— colour bar no longer appends the config unit.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code