Repository navigation
feat: Mapper.mesh_magnification — source-plane magnification per mesh pixel - #674
Merged
Merged
Conversation
data_pixel_area_for_pix_from (previously a stub) returns the image-plane area mapping to each pixel; mesh_magnification divides it by the mesh's areas_for_magnification. plot_inversion_reconstruction gains cb_unit. Arc phase 8b (#673). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Downstream: PyAutoLabs/PyAutoGalaxy#691 → PyAutoLabs/PyAutoLens#816 → PyAutoLabs/autolens_workspace#615. Merge in that order after this. |
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
Closes #673 (cluster arc phase 8b, with PyAutoGalaxy / PyAutoLens / autolens_workspace PRs to follow). A pixelized source's mesh now gives the magnification of every pixel: the image-plane area that maps to it divided by its source-plane area (phase 4's
areas_for_magnification), i.e. how much the lens magnifies that region of the source summed over all its images. It is what PyAutoGalaxy's newplot_magnification_source_planecolours the mesh by.API Changes
Mapper.data_pixel_area_for_pix_from()was a stub returningNone; it now returns the image-plane area per mesh pixel. NewMapper.mesh_magnificationproperty.plot_inversion_reconstructiongains an optionalcb_unit.See full details below.
Test Plan
test_autoarrayfull suite: 2287 passed, 4 xfailedtest_mesh_magnification.py(identity lens, every mesh): image areas sum to the mask area (1e-10) andsum(mesh_magnification * areas)gives it back; interior pixels have mu ~ 1 within per-mesh tolerances set ~2x the measured value (documented in the module, e.g. Delaunay 2.9e-3, RectangularUniform 9.1e-4; DelaunayNN 9.2e-2 is a documented approximation — dual areas vs Sibson weights); zero-area pixels give zeroFull API Changes (for automation & release notes)
Added
Mapper.mesh_magnification(property) —data_pixel_area_for_pix_from() / mesh_geometry.areas_for_magnification, zero where either is zero.plot_inversion_reconstruction(..., cb_unit=None)— unit on the middle colour-bar label;""shows none.Changed
Mapper.data_pixel_area_for_pix_from()— implemented (waspass): column sums ofmapping_matrixtimes the image pixel area.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code