feat(interferometer): visualizer on array-free datasets (streaming phase 3) - #761
Conversation
…ase 3, PyAutoArray#596) Natural-weighted fit properties and array-free branches in subplot_fit (2x3), subplot_fit_dirty_images, subplot_fit_interferometer_combined, subplot_fit_real_space and subplot_tracer_from_fit; positions image from dirty_image_natural. Both visualizers' InversionException fallbacks called logger(...) (TypeError) and now log a warning (the imaging one is the same defect, fixed in passing). Stale dirty_images.fits test assertion fixed and the dead tracked file removed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZZksyZ8LTA4LLxoZjQMNF
Independent review (Codex gpt-6-astra) of the three branches before PR-open
FINDINGS (1) Disposition: FINDINGS (1) — 🤖 Generated with Claude Code |
Summary
PyAutoLens half of streaming phase 3 (https://github.com/orgs/PyAutoLabs/discussions/13; epic
streaming-visibilities). Pairs with PyAutoLabs/PyAutoArray#597 (issue PyAutoLabs/PyAutoArray#596) and PyAutoLabs/PyAutoGalaxy#640. CI resolves the same-named upstream branches.FitInterferometergainsmodel_image_natural(lensed galaxy images),dirty_model_image_natural,dirty_residual_map_natural.subplot_fitbecomes a 2×3 (natural dirty image / model / residual; source plane zoomed / unzoomed; one blank);subplot_fit_dirty_images1×3 natural;subplot_fit_interferometer_combinednatural dirty image / model, source plane, natural residual;subplot_fit_real_space"Reconstructed Image" andsubplot_tracer_from_fitpanel 0 usedirty_model_image_natural. In-memory output unchanged.interferometer/model/visualizer.py:logger(...)→logger.warning(...); the positions image usesdirty_image_naturalon array-free. The identicallogger(...)TypeError inimaging/model/visualizer.py(L143) is fixed too — same defect, one line, flagged here as the only change outside the interferometer scope.dirty_images.fits(the writer producesfit_dirty_images.fits; it passed only because a tracked 207 KB file existed) is fixed and the dead tracked file removed.Witness: al
visualize_before_fit+visualizewrite the same 10 files array-free and in memory; array-free vs in-memory natural dirty model rel 2.2e-15; W̃ vs transformer path rel 3.9e-14.API Changes
Additive: the three
FitInterferometernatural properties. Array-free datasets get natural-weighted panels under the existing filenames; in-memory unchanged. Both visualizers' linear-algebra fallbacks log a warning instead of raisingTypeError.See full details below.
Test Plan
pytest test_autolens— 776 passed, 1 xfailed (774 before the review fix)fit_dirty_images.png/.fits,image_with_positions.png,tracer.png); array-free plot-function branches; fit properties; red with the source changes stashedHeart RED override (development only)
Heart verdict at ship: RED (2026-09-30T18:32Z):
release validation FAILED (stage integrate)(unrelated release-integrate leg) plus two canonical-checkout drift reasons from another session (PyAutoLens: on branch feature/point-solver-padding-backend (not main),PyAutoLens: 2 uncommitted source change(s)) — none caused by these branches. Live human authorization in-session 2026-09-30 for issue PyAutoLabs/PyAutoArray#596 and the threefeature/streaming-p3-visualizerbranches ("Authorize override for #596"): commit, push and the pending-release PRs only. Branch gates:test_autoarray1898,test_autogalaxy1293,test_autolens776 + 1 xfailed; red-checks on the inversion-plot fix and the array-free tests; Codex (gpt-6-astra) review: FINDINGS (1) —model_image_naturalsummedgalaxy_image_dict, whose entries are overwritten by a galaxy's linear reconstruction, so a galaxy with both ordinary and linear light lost its ordinary component (reproduced: rel error 1.0 in ag, 1.14/1.31 in al); fixed in-branch asprofile_image + inversion.mapped_reconstructed_data, with mixed-galaxy tests against an independent transformer reference fromfit.model_data(rel ≤ 2e-14), red-checked. Merge needs its own explicit human command with every check green.Full API Changes (for automation & release notes)
Added
FitInterferometer.model_image_natural,.dirty_model_image_natural,.dirty_residual_map_naturalChanged Behaviour
subplot_fit,subplot_fit_dirty_images,subplot_fit_interferometer_combined,subplot_fit_real_space,subplot_tracer_from_fit— natural-weighted panels on array-free datasetsVisualizerInterferometer/VisualizerImaging—logger.warningin theInversionExceptionfallback (was aTypeError); interferometer positions image fromdirty_image_naturalon array-freeMigration
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JZZksyZ8LTA4LLxoZjQMNF