Skip to content

Commit 539c3e0

Browse files
Jammy2211claude
authored andcommitted
Update tests to use new fits API instead of removed output_to_fits methods
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 09fea4d commit 539c3e0

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

test_autolens/imaging/test_simulate_and_fit_imaging.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ def test__perfect_fit__chi_squared_0():
4646
if path.exists(file_path) is False:
4747
os.makedirs(file_path)
4848

49-
dataset.output_to_fits(
49+
from autoarray.dataset.plot.imaging_plots import fits_imaging
50+
51+
fits_imaging(
52+
dataset=dataset,
5053
data_path=path.join(file_path, "data.fits"),
5154
noise_map_path=path.join(file_path, "noise_map.fits"),
5255
psf_path=path.join(file_path, "psf.fits"),
56+
overwrite=True,
5357
)
5458

5559
dataset = al.Imaging.from_fits(
@@ -756,10 +760,14 @@ def test__fit_figure_of_merit__mge_mass_model(masked_imaging_7x7, masked_imaging
756760
if path.exists(file_path) is False:
757761
os.makedirs(file_path)
758762

759-
dataset.output_to_fits(
763+
from autoarray.dataset.plot.imaging_plots import fits_imaging
764+
765+
fits_imaging(
766+
dataset=dataset,
760767
data_path=path.join(file_path, "data.fits"),
761768
noise_map_path=path.join(file_path, "noise_map.fits"),
762769
psf_path=path.join(file_path, "psf.fits"),
770+
overwrite=True,
763771
)
764772

765773
dataset = al.Imaging.from_fits(

test_autolens/interferometer/test_simulate_and_fit_interferometer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ def test__perfect_fit__chi_squared_0():
4848
if path.exists(file_path) is False:
4949
os.makedirs(file_path)
5050

51-
dataset.output_to_fits(
51+
from autoarray.dataset.plot.interferometer_plots import fits_interferometer
52+
53+
fits_interferometer(
54+
dataset=dataset,
5255
data_path=path.join(file_path, "data.fits"),
5356
noise_map_path=path.join(file_path, "noise_map.fits"),
5457
uv_wavelengths_path=path.join(file_path, "uv_wavelengths.fits"),
58+
overwrite=True,
5559
)
5660

5761
real_space_mask = al.Mask2D.all_false(

0 commit comments

Comments
 (0)