Repository navigation
Add FitInterferometer sparse-vs-mapping parity assertion (PyAutoArray#499) - #283
Merged
Merged
Conversation
…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
5 tasks done
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
Adds an interferometer counterpart to
misc/jax_assertions/fit_imaging_sparse_operator.py: aFitInterferometerwith 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 declaresENV: jaxso the smoke profile'sPYAUTO_DISABLE_JAX=1is released; ~9 s and ~4.5 s wall.Noise map is non-uniform per visibility with equal real/imag sigma (what
SimulatorInterferometerand real data produce) — theRe(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=Falseso the reconstruction check is not vacuous)smoke_tests.txt— registermisc/jax_assertions/fit_imaging_sparse_operator.pyandmisc/jax_assertions/fit_interferometer_sparse_operator.pyUpstream PR
PyAutoLabs/PyAutoArray#500
Test Plan
86e2944a(pre-#500)build_env_for_scriptresolvesPYAUTO_DISABLE_JAX=Nonefor both entries;validate_env_profiles.py0 errorsGenerated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_012JM45sA4YGEUw6KYW8Pm96