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

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
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
palacios22c pushed a commit to palacios22c/PyAutoLens that referenced this pull request Sep 13, 2026
…ob) (PyAutoGalaxy#608)

Since PyAutoGalaxy#479 / PyAutoLabs#574 every imaging/interferometer search wrote dataset.fits twice with
identical contents: files/dataset.fits unconditionally from save_attributes via
paths.save_fits, and image/dataset.fits from the plotter gated on the
visualize plots.yaml `dataset.fits_dataset` setting.

save_attributes now writes image/dataset.fits directly (paths.image_path),
skipping the write when the file already exists (resumed search). The gated
plotter writes and the `fits_dataset` config key are removed. The aggregator
already scans image/ for .fits, so fit.value(name="dataset") is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Giskz46AjniG7E9dKxwpTG
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.

2 participants