Repository navigation
feat: magnification uncertainty map from posterior draws (LEGGOS Fig. 4) - #693
Merged
Merged
Conversation
magnification_fractional_error_2d_from gives the per-pixel fractional error of |mu| over a list of per-draw magnification maps; plot_magnification_uncertainty_2d maps it with the best-fit constant-mu contours and critical curves (LEGGOS II figure 4). Arc phase 8c (#692). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 2, 2026
Collaborator
Author
|
Downstream: PyAutoLabs/PyAutoLens#817 → PyAutoLabs/autolens_workspace#616. 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 #692 (cluster arc phase 8c). Maps the fractional error of the magnification at every image-plane pixel over a set of posterior draws, with the best-fit constant-magnification contours and critical curves on top — the magnification uncertainty map published with cluster lens models (LEGGOS II, arXiv:2606.20804, figure 4). The workspace's source science scripts already draw from the posterior (phase 7b); they now store each draw's magnification map and plot this.
API Changes
Two new public functions in
autogalaxy.plot:magnification_fractional_error_2d_fromandplot_magnification_uncertainty_2d.See full details below.
Test Plan
test_autogalaxyfull suite: 1475 passedimaging/source_science.py(100 draws): median sigma/|mu| 0.23% (|mu| 1-3), 0.50% (3-10), 2.0% (10-30), 8.8% (>30, on the critical curve) — consistent with the run's scalar errors (0.9-1.9%); map shows the low-error plane with a bright ring along the critical curveFull API Changes (for automation & release notes)
Added
autogalaxy.plot.magnification_fractional_error_2d_from(magnification_list, magnification_best) -> Array2D— half the 16th-84th percentile range of |mu| over the draws / |mu_best|; inf where mu_best = 0.autogalaxy.plot.plot_magnification_uncertainty_2d(magnification_list, magnification_best, grid, mass_obj=None, contour_levels=(2, 5, 10, 20, 50, 100), include_critical_curves=True, tangential_critical_curves=None, radial_critical_curves=None, vmin=0.0, vmax=None, title=..., colormap="default", output_path=None, output_filename="magnification_uncertainty_2d", output_format=None, ax=None)—vmax=Nonecaps at the 95th percentile.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code