Skip to content

Add FitInterferometer sparse-vs-mapping parity assertion (PyAutoArray#499) - #283

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-sparse-func-list
Aug 28, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/interferometer-sparse-func-list

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds an interferometer counterpart to misc/jax_assertions/fit_imaging_sparse_operator.py: a FitInterferometer with a linear light profile plus one, then two, pixelized sources is evaluated through both the mapping-matrix and sparse-operator inversion paths and the two must agree. This is the workspace-level guard for PyAutoLabs/PyAutoArray#499 — on PyAutoArray before #500 the sparse path silently dropped every linear-function and cross-mapper block, and this script fails there on its shape assertion (9x9 vs 10x10).

Both sparse-operator assertion scripts are now in smoke_tests.txt (the imaging one existed but was never registered). Each declares ENV: jax so the smoke profile's PYAUTO_DISABLE_JAX=1 is released; ~9 s and ~4.5 s wall.

Noise map is non-uniform per visibility with equal real/imag sigma (what SimulatorInterferometer and real data produce) — the Re(FᴴWF) reduction is only exact under that equality, which is a pre-existing property of the formalism, documented in the script.

Scripts Changed

  • scripts/misc/jax_assertions/fit_interferometer_sparse_operator.py — new: sparse vs mapping parity for linear light + 1 and 2 mappers (curvature_matrix / data_vector / regularization_matrix at 1e-12, reconstruction, log_evidence; use_positive_only_solver=False so the reconstruction check is not vacuous)
  • smoke_tests.txt — register misc/jax_assertions/fit_imaging_sparse_operator.py and misc/jax_assertions/fit_interferometer_sparse_operator.py

Upstream PR

PyAutoLabs/PyAutoArray#500

Test Plan

  • Both scripts pass via the smoke runner against the #500 branch (autolens: 8.8 s / 4.5 s)
  • Control: interferometer script fails on PyAutoArray 86e2944a (pre-#500)
  • build_env_for_script resolves PYAUTO_DISABLE_JAX=None for both entries; validate_env_profiles.py 0 errors
  • Smoke CI green once #500 is merged (library-first gate — this PR fails against PyAutoArray main until then)

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_012JM45sA4YGEUw6KYW8Pm96

…arse-operator assertions in smoke

`misc/jax_assertions/fit_interferometer_sparse_operator.py` fits a tracer with
a linear light profile plus one and then two pixelized sources through both
`InversionInterferometerMapping` and `InversionInterferometerSparse` and asserts
curvature_matrix / data_vector / regularization_matrix (1e-12), reconstruction
and log_evidence agree. Guards PyAutoArray#499 (#500): on pre-#500 PyAutoArray
the sparse path returns the 9x9 single-mapper block against the mapping path's
10x10 and the script fails on its shape assertion.

Also registers this and the existing (previously unregistered)
`fit_imaging_sparse_operator.py` in smoke_tests.txt; both declare `ENV: jax`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012JM45sA4YGEUw6KYW8Pm96
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 28, 2026
@Jammy2211
Jammy2211 merged commit 93a70af into main Aug 28, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/interferometer-sparse-func-list branch August 28, 2026 15:44
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant