test(viz): __Visualization Sanity__ rollout across visualization_jax*.py#115
Merged
Merged
Conversation
Phase D.2.a — adds __Visualization Sanity__ blocks to each existing visualization_jax*.py script in autolens_workspace_test (3 scripts). Companion to Phase D.1 (PRs #113 / #54). These scripts are the single-shot JAX-backed visualization path — no Nautilus search, the Sanity block goes at the end of the script after the existing PILOT SUCCEEDED print. Scripts updated: - scripts/imaging/visualization_jax.py — SIE Sanity (correctness + perf) - scripts/interferometer/visualization_jax.py — SIE Sanity + interferometer fit.model_data (complex Visibilities) finite + non-zero via analysis.fit_from(instance=instance). - scripts/point_source/visualization_jax.py — SIE Sanity only (no FoM gate; prior-median position can legitimately give chi²=-inf). Locally validated end-to-end on all three scripts: 1 tangential CC, einstein_radius=1.1938, warm-call latencies 88-98 ms (all under the 100 ms threshold), interferometer model_data sum 11118. Phase D.2.b (new modeling_visualization_jit + viz_jax for ellipse, weak lensing, quantity viz_jit) follows once this lands. Closes #114. 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
Phase D.2.a of
z_features/fast_visualization.md. Adds__Visualization Sanity__blocks to the three existingvisualization_jax*.pyscripts in this repo — the single-shot JAX-backed visualization path (no Nautilus search), companion code path to themodeling_visualization_jit*.pyscripts covered in Phase D.1 (PR #113).Each block is inserted at the end of the script (after the existing
PILOT SUCCEEDEDprint) because these scripts have no Part-1/Part-2 split. Uses the same SIE-sanity-tracer +LensCalc.from_tracer(...)+ 3-assertion shape proven in the imaging pilot (PR #111).Scripts Changed
scripts/imaging/visualization_jax.py— SIE Sanity (1 tangential CC + finite positive Einstein radius + warm-call < 100 ms).scripts/interferometer/visualization_jax.py— SIE Sanity + interferometer-specificfit.model_data(complex Visibilities) finite + non-zero viaanalysis.fit_from(instance=instance). Catches NUFFT / linear-inversion collapse independent of the SIE-tracer lensing-side checks.scripts/point_source/visualization_jax.py— SIE Sanity only. No script-specific FoM assertion — the prior-median position can legitimately give chi² = -inf when outside the image-pair basin (same reasoning as the Phase D.1 point_source block).Test Plan
imaging/visualization_jax.py— full local run passed:1 tangential CC, einstein_radius=1.1938, warm call 90.6 ms.interferometer/visualization_jax.py— full local run passed:1 tangential CC, einstein_radius=1.1938, warm call 98.6 ms, |model_data|.sum() = 11118.6110.point_source/visualization_jax.py— full local run passed:1 tangential CC, einstein_radius=1.1938, warm call 88.8 ms./smoke_test autolens_workspace_test(smoke list doesn't includevisualization_jax*.py; tests other scripts for broader regression check).run_all_scripts.shafter merge exercises all three updated scripts end-to-end.Out of Scope (Phase D.2.b)
modeling_visualization_jit.py+visualization_jax.pyfor autolens weak lensing (entirescripts/weak/directory missing).modeling_visualization_jit.pymissing) and autogalaxy quantity (same gap).Closes #114 (alongside the autogalaxy_workspace_test companion).
🤖 Generated with Claude Code