Skip to content

test(jax): add FitImaging sparse-operator parity script#69

Merged
Jammy2211 merged 1 commit intomainfrom
feature/move-sparse-operator-parity
May 1, 2026
Merged

test(jax): add FitImaging sparse-operator parity script#69
Jammy2211 merged 1 commit intomainfrom
feature/move-sparse-operator-parity

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

  • New script scripts/jax_assertions/fit_imaging_sparse_operator.py performing a cross-implementation parity check on the JAX-accelerated ImagingSparseOperator path inside a multi-plane FitImaging fit (mapping-matrix vs apply_sparse_operator(), asserting agreement on curvature_matrix and regularization_matrix to rtol=1e-4).
  • Mirrors the test that's being deleted in companion PR PyAutoLens#489 — that test was breaking PyAutoBuild CI by pulling jax into the PyAutoLens unit-test env.
  • Same pattern as the existing scripts/jax_assertions/sparse_operators.py (autoarray-level analogue, see PR test(jax): add scripts/jax_assertions/ with assertions moved from PyAutoArray #68).

Companion PR

Test plan

  • python scripts/jax_assertions/fit_imaging_sparse_operator.py prints fit_imaging_sparse_operator: all assertions passed.
  • Companion PR PyAutoLens#489 turns PyAutoBuild green.

🤖 Generated with Claude Code

Mirror of the test deleted from PyAutoLens
test_autolens/imaging/test_simulate_and_fit_imaging.py
(test__simulate_imaging_data_and_fit__complex_fit_compare_mapping_matrix_sparse_operator).

The pytest version pulled the JAX import into the library unit-test run
and broke PyAutoBuild CI. Lifting it here keeps the parity coverage
without forcing JAX into PyAutoLens' env, matching the precedent set by
the existing scripts/jax_assertions/sparse_operators.py.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit 54ac3bd into main May 1, 2026
0 of 4 checks passed
@Jammy2211 Jammy2211 deleted the feature/move-sparse-operator-parity branch May 1, 2026 08:18
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