Skip to content

fix: write dataset.fits in save_attributes for aggregator#574

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/fix-aggregator-dataset-fits
Jul 8, 2026
Merged

fix: write dataset.fits in save_attributes for aggregator#574
Jammy2211 merged 1 commit into
mainfrom
feature/fix-aggregator-dataset-fits

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Companion to PyAutoLabs/PyAutoGalaxy#478 (PR PyAutoLabs/PyAutoGalaxy#479).

PyAutoLens's AnalysisImaging/AnalysisInterferometer never persisted dataset.fits in save_attributes (relied on the visualization-gated image/ copy). Adds an unconditional paths.save_fits(name="dataset", ...) honouring the aggregator HDU contract.

Verified: autolens guides/results/aggregator/models.py runs to completion (exit 0), TypeError gone. New regression test asserts files/dataset.fits has [MASK, DATA, NOISE_MAP, PSF]. Analysis suite (10 tests) passes.

Merge order: land PyAutoLabs/PyAutoGalaxy#479 first (library-first).

🤖 Generated with Claude Code

…/PyAutoGalaxy#478)

PyAutoLens's AnalysisImaging/AnalysisInterferometer never persisted the
`dataset.fits` the aggregator loaders require in save_attributes; they
relied on the plotter-interface copy in `image/`, which is gated on the
`fits_dataset` visualization setting. Fits without that output break the
aggregator with `fit.value(name="dataset") -> None`.

Add an unconditional `paths.save_fits(name="dataset", ...)` to
save_attributes (AnalysisImaging override + AnalysisInterferometer),
honouring the HDU contract (mask/data/noise_map/psf/over_sample_size_* ;
interferometer: mask/data/noise_map/uv_wavelengths). Mirrors the
PyAutoGalaxy fix in PyAutoLabs/PyAutoGalaxy#478.

Adds a regression test asserting save_attributes writes files/dataset.fits
with [MASK, DATA, NOISE_MAP, PSF].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XwGFQNneASyEoHJm3RGecm
Copilot AI review requested due to automatic review settings July 8, 2026 15:43
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Jammy2211 Jammy2211 merged commit 710ca9f into main Jul 8, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the feature/fix-aggregator-dataset-fits branch July 8, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants