fix: restore unconditional dataset.fits output for aggregator (save_attributes)#479
Merged
Merged
Conversation
`AnalysisImaging`/`AnalysisInterferometer`.save_attributes stopped writing `dataset.fits` to the `files` folder after the visualization overhaul (825544b/081bbd84), leaving only the plotter-interface copy in `image/` which is gated on the `fits_dataset` visualization setting. Fits that don't emit that output (test-mode/minimal searches) then break the aggregator loaders with `fit.value(name="dataset") -> None`. Restore an unconditional `paths.save_fits(name="dataset", ...)` in save_attributes, honouring the documented HDU contract (mask/data/noise_map/psf/over_sample_size_* ; interferometer: mask/data/noise_map/uv_wavelengths) using current plotter accessors. 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 was referenced Jul 8, 2026
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.
Fixes #478.
save_attributes(imaging + interferometer) again writesdataset.fitsto thefilesfolder unconditionally, restoring the aggregator data contract that regressed in the visualization overhaul (825544b/081bbd84). Uses current plotter accessors (.native_for_fits,.header_dict); HDU order matches the aggregator (mask/data/noise_map/psf/…).Verified:
autogalaxyguides/results/aggregator/models.pyruns to completion (exit 0), TypeError gone. New regression test assertsfiles/dataset.fitshas[MASK, DATA, NOISE_MAP, PSF]. Analysis suite (5 tests) passes.Paired with the PyAutoLens fix (same branch) for
autolens_workspace.🤖 Generated with Claude Code