Repository navigation
feat: matrix-free interferometer positivity via primal-dual interior point with active-set polish (phase 4 of #638) - #652
Merged
Conversation
…point with active-set polish Phase 4 of #638 (#648). reconstruction_positive_via_interior_point_from solves (F + lambda H) s = D, s >= 0 with a Mehrotra predictor-corrector interior point whose Newton systems are CG-solved with the Powell preconditioner plus the barrier diagonal (sparse LU per step), then an exact free-set CG solve with primal-dual active-set corrections so held pixels are exact zeros. Module docstring lists the remaining phase-5 work. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… sparse positive-only path Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 26, 2026
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.
Closes #648. Phase 4 of #638. Community proposal: PyAutoLabs/.github#39 (@HRSAstro), reference snippet section 6.
Summary
Positivity for the matrix-free interferometer path without an n×n factorisation:
reconstruction_positive_via_interior_point_fromsolves (F + H)x = D, x ≥ 0 by a Mehrotra predictor-corrector primal-dual interior point method (Jacobi start; each Newton step a CG solve preconditioned by the sparse LU of the Powell preconditioner plus the barrier diagonal, refactorised per step; CG tolerance tied to the duality gap; centring σ = (μ_aff/μ)³; fraction-to-boundary 0.99). Once the active set settles the free pixels are solved exactly by CG with the free-set sub-preconditioner, so held pixels are exact zeros, with primal-dual active-set corrections (Hintermüller, Ito & Kunisch 2002) if negatives appear. Returns aPositiveReconstructionResult(reconstruction, support, step counts, final gap/residual, converged). The module docstring lists the remaining phase-5 work (wiring, Pulse profiling note, workspace example, uncertainty maps, linear light profiles / multiple mappers).API Changes
Additive only:
reconstruction_positive_via_interior_point_from(...)andPositiveReconstructionResultininversion_interferometer_matrix_free_util.See full details below.
Test Plan
test_matrix_free_util.py(26 tests in the file), data-dominated case (500 visibilities),MaternSparseon a 10×10 mesh:NNLS reference =
scipy.optimize.nnlson the Cholesky-whitened dense system; sparse path =InversionInterferometerSparsepositive-only (use_edge_zeroed_pixels=Falseso both solve the same problem). All-positive case matches the unconstrained PCG to 4.9e-10. 6×6 sweep over coefficients 1e-4 to 1e7: support mismatch 0 everywhere, 7–22 steps. Forcing an early stop after 2 interior-point steps exercises 3 polish solves and still recovers the NNLS support and values. JAX-blocked subprocess test extended. Worktree run:pytest test_autoarray/inversion -q→ 1067 passed, 4 xfailed.Heart YELLOW acknowledged by the human on 2026-10-21 (manifest drift 1 mismatch; release validation stale: source moved since rehearsal (PyAutoArray)).
Full API Changes (for automation & release notes)
Added
inversion_interferometer_matrix_free_util.reconstruction_positive_via_interior_point_from(operator, regularization_matrix_sparse, coefficient, max_steps=60, tol=1e-9, cg_rtol_min=1e-8, cg_rtol_max=1e-2, polish_rtol=1e-10, max_polish=10, maxiter=5000)→PositiveReconstructionResult(reconstruction, support, n_steps, n_polish, gap, residual, converged)Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code