Skip to content

Solved point-source fit coverage: jax_likelihood variants, gradients, fluxes+time delays (#657 phase 3) - #237

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/point-source-chi-squared-variants
Jul 30, 2026
Merged

Solved point-source fit coverage: jax_likelihood variants, gradients, fluxes+time delays (#657 phase 3)#237
Jammy2211 merged 1 commit into
mainfrom
feature/point-source-chi-squared-variants

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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 exercising FitFluxesSolved/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 remaining jit(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 to TypeError accordingly.

Scripts Changed

  • scripts/point_source/simulators/simple.py — adds deterministic fluxes (flux×|magnification|) + time delays (tracer.time_delays_from) and a second output point_dataset_with_fluxes_and_time_delays.json (committed alongside its tracked siblings)
  • scripts/point_source/jax_likelihood/source_plane.py — BLOCKER narrative corrected + narrowed to TypeError; new FitPositionsSourceSolved section (vmap literal −94.70750993, eager parity, Path A blocker)
  • scripts/point_source/jax_likelihood/image_plane.py — new FitPositionsImagePairAllSolved (−82.33883111) and FitPositionsImagePairRepeatSolved (−89.71129442) sections; Path A jit(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); one FitPositionsImagePairAllSolved section added (smoke-suite entry, kept lean)
  • scripts/point_source/jax_likelihood/fluxes_time_delays.py — NEW: FitPositionsSourceSolved + FitFluxesSolved + FitTimeDelaysSolved on 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 row

Upstream PR

PyAutoLabs/PyAutoLens#659 (with PyAutoLabs/PyAutoArray#414, PyAutoLabs/PyAutoGalaxy#531) — all merged 2026-07-27.

Test Plan

  • All edited/new scripts run green end-to-end with fresh regression literals (values recorded above)
  • Path A jit(fit_from) passes exactly for all image-plane solved variants; source-plane/fluxes blockers fire TypeError only
  • Smoke suite: 20/21 pass; the one failure (imaging/subhalo_recovery.py 300s timeout) is untouched by this PR, is green on main CI (run on 3214937), and only exceeds the cap on the local dev laptop

Generated by the PyAutoLabs agent workflow.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 30, 2026
@Jammy2211
Jammy2211 merged commit 6e12f70 into main Jul 30, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/point-source-chi-squared-variants branch July 30, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant