Repository navigation
fix: write dataset.fits once, always, to image/ (drop fits_dataset knob) - #731
Merged
Merged
Conversation
…ob) (PyAutoGalaxy#608) Since PyAutoGalaxy#479 / #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
This was referenced Sep 8, 2026
fix: write dataset.fits once, always, to image/ (drop fits_dataset knob)
PyAutoLabs/PyAutoGalaxy#608
Closed
Collaborator
Author
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.
Summary
Every imaging and interferometer search has written
dataset.fitstwice since PyAutoGalaxy#479 / #574:files/dataset.fitsunconditionally fromsave_attributes(viapaths.save_fits), and an identicalimage/dataset.fitsfrom the plotter interface gated onvisualize/plots.yamldataset.fits_dataset. Spotted in a Euclidvis_lpoutput folder; generic library behaviour.This PR makes
dataset.fitsa single, always-written file underimage/:AnalysisImaging.save_attributesandAnalysisInterferometer.save_attributeswrite it directly topaths.image_pathand skip the write when the file already exists (a resumed search does not rewrite it). Thefits_dataset-gated plotter writes and thefits_datasetconfig key are removed.autofit.aggregator.SearchOutputalready scansimage/for.fits, sofit.value(name="dataset")and the*Aggloaders are unchanged.Not touched: PyAutoFit. Known trade-off:
DatabasePaths.save_fitsno longer receivesdatasetfromsave_attributes(the pre-#574 behaviour); an image-folder-awaresave_fitsin PyAutoFit can follow if the database route needs it.Tracked in PyAutoLabs/PyAutoGalaxy#608 (companion to the PyAutoGalaxy PR).
API Changes
visualize/plots.yamldataset.fits_datasetis removed —dataset.fitsis always written, once, to the search'simage/folder. Workspaceconfig/visualize/plots.yamlcopies should drop the key (workspace follow-up PRs).dataset.fitsis no longer written tofiles/; readers that hard-codedfiles/dataset.fitsshould readimage/dataset.fits(the aggregator needs no change).See full details below.
Test Plan
pytest test_autolens/analysis test_autolens/imaging test_autolens/interferometerdataset.fits, underimage/, none underfiles/af.Aggregator.from_directory(...)+al.agg.ImagingAgg(agg).dataset_gen_from()round-trips the datasetFull API Changes (for automation & release notes)
Removed
config/visualize/plots.yamlkeydataset.fits_dataset— the output is unconditional now.Changed
AnalysisImaging.save_attributes,AnalysisInterferometer.save_attributes— writeimage/dataset.fits(wasfiles/dataset.fits), skipped when the file exists.Migration
dataset.fitsunder bothfiles/andimage/;fits_dataset: trueinplots.yaml.image/dataset.fitsonly; delete thefits_datasetline from any copiedplots.yaml.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Giskz46AjniG7E9dKxwpTG