diff --git a/autogalaxy/aggregator/imaging/imaging.py b/autogalaxy/aggregator/imaging/imaging.py index 9a30e785..a3e3493b 100644 --- a/autogalaxy/aggregator/imaging/imaging.py +++ b/autogalaxy/aggregator/imaging/imaging.py @@ -50,13 +50,20 @@ def _imaging_from( except AttributeError: psf = None - over_sampling = fit.value(name="dataset.over_sampling") + try: + over_sampling_uniform = aa.Array2D.from_primary_hdu(primary_hdu=fit.value(name="dataset.over_sampling_size_uniform")).native + except AttributeError: + over_sampling_uniform = 1 + try: + over_sampling_pixelization = aa.Array2D.from_primary_hdu(primary_hdu=fit.value(name="dataset.over_sampling_size_pixelization")).native + except AttributeError: + over_sampling_pixelization = 1 dataset = aa.Imaging( data=data, noise_map=noise_map, psf=psf, - over_sampling=over_sampling, + over_sampling=aa.OverSamplingDataset(uniform=over_sampling_uniform, pixelization=over_sampling_pixelization), check_noise_map=False, ) diff --git a/autogalaxy/analysis/analysis/dataset.py b/autogalaxy/analysis/analysis/dataset.py index 28c3cdd6..ea448137 100644 --- a/autogalaxy/analysis/analysis/dataset.py +++ b/autogalaxy/analysis/analysis/dataset.py @@ -178,9 +178,14 @@ def save_attributes(self, paths: af.DirectoryPaths): hdu=self.dataset.noise_map.hdu_for_output, prefix="dataset", ) - paths.save_json( - name="over_sampling", - object_dict=to_dict(self.dataset.over_sampling), + paths.save_fits( + name="over_sampling_size_uniform", + hdu=self.dataset.grids.uniform.over_sampling_size.native.hdu_for_output, + prefix="dataset", + ) + paths.save_fits( + name="over_sampling_size_pixelization", + hdu=self.dataset.grids.pixelization.over_sampling_size.native.hdu_for_output, prefix="dataset", ) paths.save_json(