Solved point-source fit coverage: jax_likelihood variants, gradients, fluxes+time delays (#657 phase 3) - #237
Merged
Conversation
…dients, fluxes+time-delays (#657 phase 3)
2 tasks
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 3 of PyAutoLens#657 (analytically-solved point-source likelihoods, Lombardi 2024 arXiv:2406.15280): pairs every phase-2 solved fit class with JAX regression coverage. Adds solved-variant sections (parameter-free
al.ps.PointSolved) to the point-source jax_likelihood scripts, a new fluxes+time-delays script exercisingFitFluxesSolved/FitTimeDelaysSolved, a solved source-plane gradient block, and a deterministic fluxes+time-delays dataset output in the simulator. Also corrects the stale source-plane BLOCKER narrative: the xp-propagation bug was fixed in phase 2 (PyAutoArray#414); the sole remainingjit(fit_from)gap is the fit-return pytree issue (PointSolver leaf), tracked in PyAutoPrompt/autolens/fit_point_pytree.md, and the except clause is narrowed toTypeErroraccordingly.Scripts Changed
scripts/point_source/simulators/simple.py— adds deterministic fluxes (flux×|magnification|) + time delays (tracer.time_delays_from) and a second outputpoint_dataset_with_fluxes_and_time_delays.json(committed alongside its tracked siblings)scripts/point_source/jax_likelihood/source_plane.py— BLOCKER narrative corrected + narrowed toTypeError; newFitPositionsSourceSolvedsection (vmap literal −94.70750993, eager parity, Path A blocker)scripts/point_source/jax_likelihood/image_plane.py— newFitPositionsImagePairAllSolved(−82.33883111) andFitPositionsImagePairRepeatSolved(−89.71129442) sections; Path Ajit(fit_from)passes exactly for both (no try/except)scripts/point_source/jax_likelihood/point.py— header docstring fixed (was a copy-paste of an imaging operated-light-profile description); oneFitPositionsImagePairAllSolvedsection added (smoke-suite entry, kept lean)scripts/point_source/jax_likelihood/fluxes_time_delays.py— NEW:FitPositionsSourceSolved+FitFluxesSolved+FitTimeDelaysSolvedon the fluxes+delays dataset; free-H0 vmap model (−137.67455417); H0-matched eager-vs-vmap parity (time delays are H0-sensitive, so parity requires identical cosmology); cosmology-dropped Path-A reference (−133.01151506)scripts/point_source/jax_grad/gradient.py— solved source-plane gradient block (finiteness + finite-difference vs autodiff); image-plane solver gradients deliberately deferred to phase 5 (custom_jvp)scripts/CLAUDE.md— point_source jax_likelihood table rows updated + new rowUpstream PR
PyAutoLabs/PyAutoLens#659 (with PyAutoLabs/PyAutoArray#414, PyAutoLabs/PyAutoGalaxy#531) — all merged 2026-07-27.
Test Plan
jit(fit_from)passes exactly for all image-plane solved variants; source-plane/fluxes blockers fireTypeErroronlyimaging/subhalo_recovery.py300s timeout) is untouched by this PR, is green on main CI (run on 3214937), and only exceeds the cap on the local dev laptopGenerated by the PyAutoLabs agent workflow.