feat(interferometer): visualizer on array-free datasets (streaming phase 3) - #640
Conversation
…ase 3, PyAutoArray#596) FitInterferometer.model_image_natural / dirty_model_image_natural / dirty_residual_map_natural; subplot_fit, subplot_fit_dirty_images, subplot_fit_real_space and fits_dirty_images draw the natural-weighted set on array-free datasets under the same filenames; the visualizer's InversionException fallback called logger(...) (TypeError) and now logs a warning. In-memory output unchanged. 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
PyAutoGalaxy 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/PyAutoLens#761. CI on this branch resolves the same-named PyAutoArray branch.FitInterferometergainsmodel_image_natural(profile_image + inversion.mapped_reconstructed_data— the ordinary light plus every linear reconstruction, so a galaxy mixing both is complete; equalsinversion.mapped_reconstructed_dataon pixelization-only fits),dirty_model_image_natural(via autoarray'sdirty_model_image_natural_from) anddirty_residual_map_natural— on both dataset kinds with a sparse operator.subplot_fit,subplot_fit_dirty_imagesand the pixelization branch ofsubplot_fit_real_spacedraw the 1×3 natural set (dirty image / model / residual) under the same filenames;fits_dirty_imageswritesDIRTY_IMAGE_NATURAL,DIRTY_BEAM,DIRTY_MODEL_IMAGE_NATURAL,DIRTY_RESIDUAL_MAP_NATURAL. In-memory output unchanged (tested by value againstfit.dirty_*).interferometer/model/visualizer.py: theInversionExceptionfallback calledlogger(...)(aLoggeris not callable →TypeError); nowlogger.warning(...).Witness:
visualize_before_fit+visualizeon a 1e5-visibility streamed dataset write the same 7 files as the in-memory run; array-free vs in-memory natural dirty model rel 2.0e-15; W̃ path vs transformer path rel 3.4e-14.API Changes
Additive:
FitInterferometer.model_image_natural,.dirty_model_image_natural,.dirty_residual_map_natural. Array-free datasets get natural-weighted panels/extensions under the existing filenames; in-memory unchanged. The visualizer's linear-algebra fallback now logs a warning instead of raisingTypeError.See full details below.
Test Plan
pytest test_autogalaxy— 1293 passed (1291 before the review fix)dataset.png,fit.png,fit_dirty_images.fitsEXTNAMEs,galaxy_images.fits,inversion_0_0.png); array-free plot-function branches;model_image_natural == inversion.mapped_reconstructed_data; in-memory EXTNAMEs and arrays equalfit.dirty_*; 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,FitInterferometer.dirty_model_image_natural,FitInterferometer.dirty_residual_map_naturalChanged Behaviour
subplot_fit,subplot_fit_dirty_images,subplot_fit_real_space,fits_dirty_images— natural-weighted panels / extensions on array-free datasetsVisualizerInterferometer.visualize—logger.warningin theInversionExceptionfallback (was aTypeError)Migration
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01JZZksyZ8LTA4LLxoZjQMNF