You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: Register dataset FITS products for database-backed searches #744
Use the paths API for persistence in Galaxy and Lens. Check database and directory round trips, mask headers and imaging equivalents.
Approved plan
Reproduce on main and fix on feature/database-dataset-fits. Run the regression checks below. Leave PRs open for maintainer review.
Original prompt
Development details and acceptance criteria
Database-path searches cannot reload dataset.fits (written to disk, never registered via save_fits)
Type: bug
Target: PyAutoGalaxy
Repos:
PyAutoGalaxy
PyAutoLens
Themes:
aggregator
interferometer
database
Difficulty: small
Autonomy: supervised
Priority: low
Status: draft
Consequence: glance
Witness: an AnalysisInterferometer (and imaging analogue, if affected) run under af.DatabasePaths reloads its dataset through Fit.value("dataset") — the aggregator's _interferometer_from and agg_util.mask_header_from succeed on a database Fit — with the same dataset the directory-paths run reloads.
Review-minutes: 3
Unattended: ready
Lane: any
Found 2026-09-30 by the Codex review of streaming phase 2 (PyAutoGalaxy#638). AnalysisInterferometer.save_attributes
(autogalaxy/interferometer/model/analysis.py, and the autolens mirror) writes dataset.fits straight to paths.image_path and never registers it through DatabasePaths.save_fits, so under database paths Fit.value("dataset")
returns None (database Fit.value does not scan the image directory, unlike SearchOutput) and agg_util.mask_header_from fails on [0]. Pre-existing (the in-memory path has always done this); the phase-2
array-free branch inherits it. Fix: route the HDU list through paths.save_fits(name="dataset", hdu_list=...)
(check the PyAutoFit API) so both path types see it, and add a database-paths round-trip test.
Imaging, in-memory interferometry and array-free interferometry now round-trip through SQLite and directory searches. Repeated saves retain one registered dataset. The final Galaxy and Lens sources passed 25 and 22 focused tests; the Lens tests include a run against pre-change Galaxy main.
Dataset FITS products now round-trip through SQLite and directory-backed imaging and interferometer searches. Repeated saves keep one registration. Tests covered imaging plus in-memory and array-free interferometry in both libraries.
Activity
Jammy2211 commentedon Nov 22, 2026
Open for maintainer review:
Imaging, in-memory interferometry and array-free interferometry now round-trip through SQLite and directory searches. Repeated saves retain one registered dataset. The final Galaxy and Lens sources passed 25 and 22 focused tests; the Lens tests include a run against pre-change Galaxy main.
Jammy2211 commentedon Nov 22, 2026
Shipped
Dataset FITS products now round-trip through SQLite and directory-backed imaging and interferometer searches. Repeated saves keep one registration. Tests covered imaging plus in-memory and array-free interferometry in both libraries.