Repository navigation
test: mesh magnification integration check against simulator truth (arc phase 4a) - #348
Merged
Merged
Conversation
scripts/imaging/mesh_magnification.py fits a simulated Isothermal+shear lens (and an identity, no-mass leg) with the true tracer for every mesh, and asserts areas (finite, >=0, sum = covered domain) and recovered mu vs the high-resolution simulator truth within measured per-mesh, per-leg tolerances; also cross-checks the PyAutoLens magnification latent. Registered in smoke_tests.txt (PyAutoArray#659). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8NkVvJhhqNSibeGcBQ
…ar the edge (review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8NkVvJhhqNSibeGcBQ
…act areas PyAutoArray#659 now gives the adaptive rectangular meshes exact hat-quadrature areas over the over-sampled data's bounding box. All four recover the true magnification within 0.61% lensed and 0.49% identity (RTUAdaptDensity lensed stays -1.82%, unchanged by the areas). Area-sum domain updated to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Companion to PyAutoLabs/PyAutoArray#664 (PyAutoArray#659, Source & Cluster arc phase 4a). Merge after the PyAutoArray PR. The tightened tolerances need its exact areas, so smoke against released or main PyAutoArray fails until it merges.
New
scripts/imaging/mesh_magnification.py, added tosmoke_tests.txt(~40–60 s). For every pixelized mesh (9), it fits a simulated lensed Sersic source and an unlensed copy using the true tracer. It then checks three things:magnificationlatent agree.Tolerances are about 1.5× the measured error, with a 1% floor. With #664, every mesh is within 1% except RTUAdaptDensity lensed (−1.82%, tolerance 3%) and KNearestNeighbor / KNNBarycentric. Those two are known approximations whose fix is phase 4b. The per-mesh table is in the PyAutoArray PR.
🤖 Generated with Claude Code