fix: write dataset.fits in save_attributes for aggregator#574
Merged
Conversation
…/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
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.
Companion to PyAutoLabs/PyAutoGalaxy#478 (PR PyAutoLabs/PyAutoGalaxy#479).
PyAutoLens's
AnalysisImaging/AnalysisInterferometernever persisteddataset.fitsinsave_attributes(relied on the visualization-gatedimage/copy). Adds an unconditionalpaths.save_fits(name="dataset", ...)honouring the aggregator HDU contract.Verified:
autolensguides/results/aggregator/models.pyruns to completion (exit 0), TypeError gone. New regression test assertsfiles/dataset.fitshas[MASK, DATA, NOISE_MAP, PSF]. Analysis suite (10 tests) passes.Merge order: land PyAutoLabs/PyAutoGalaxy#479 first (library-first).
🤖 Generated with Claude Code