test: re-port adapt-image jax likelihood scripts after pytree fix#12
Merged
Conversation
Adds rectangular_mge.py, delaunay.py, delaunay_mge.py and restores the adapt variant of rectangular.py under scripts/jax_likelihood_functions/imaging/. Re-enables them in smoke_tests.txt; delaunay_mge.py is left commented out to mirror the autolens deferral for the JAX 0.7 regression. rectangular_mge.py is the multi-galaxy regression case the path-tuple library fix was made for: prior to PR #370 the autolens single-pixelized- galaxy fallback would silently return the wrong adapt image for the multi-pixelization case. Depends on PyAutoGalaxy #370 and PyAutoLens #474. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Re-enables adapt-image jax likelihood smoke tests for autogalaxy under
scripts/jax_likelihood_functions/imaging/. Restores the adapt variant ofrectangular.py(previously aRectangularUniform+Constantplaceholder while the library bug was open) and adds three new scripts ported from the autolens equivalents:rectangular_mge.py,delaunay.py,delaunay_mge.py. Re-enables the first three insmoke_tests.txt;delaunay_mge.pyis committed but left commented in the smoke list to mirror the autolens deferral for the JAX 0.7 regression.rectangular_mge.pyis the multi-galaxy regression case the path-tuple library fix was made for. Pre-fix, the autolens single-pixelized-galaxy fallback would silently return the wrong adapt image whenever multiple pixelizations are present in the same fit; this script catches that.Scripts Changed
scripts/jax_likelihood_functions/imaging/rectangular.py— restored adapt variant:RectangularAdaptImage+Adaptregularization, single galaxy. Replaces the placeholder.scripts/jax_likelihood_functions/imaging/rectangular_mge.py— new. Two galaxies: MGE bulge +RectangularAdaptImage+Constant. Multi-pixelization regression test.scripts/jax_likelihood_functions/imaging/delaunay.py— new. Single galaxy withDelaunaymesh +AdaptSplitregularization +Hilbertimage-mesh. Exercises theimage_plane_mesh_grid_for_galaxylookup helper.scripts/jax_likelihood_functions/imaging/delaunay_mge.py— new. Two galaxies: MGE bulge +Delaunay+MaternAdaptKernel+Hilbert. Committed but commented insmoke_tests.txtto mirror autolens deferral. Local run passes — re-enable when autolens does.smoke_tests.txt— re-enablesrectangular_mge.py,delaunay.py; commented entry fordelaunay_mge.pymatching the autolens jax-0.7 note.Upstream PR
This workspace PR is library-blocked — its CI installs autogalaxy from main, which won't have the new
AdaptImages.image_for_galaxyhelper until #370 is merged.Test Plan
rectangular.py,rectangular_mge.py,delaunay.py).source activate.sh && python scripts/jax_likelihood_functions/imaging/delaunay_mge.pypasses locally even though it's commented in the smoke list (sanity check that the script itself is correct, not the JAX 0.7 environment).🤖 Generated with Claude Code