diff --git a/autolens/imaging/plot/fit_imaging_plotters.py b/autolens/imaging/plot/fit_imaging_plotters.py index f9519acf4..463adfaa2 100644 --- a/autolens/imaging/plot/fit_imaging_plotters.py +++ b/autolens/imaging/plot/fit_imaging_plotters.py @@ -665,7 +665,12 @@ def subplot_mappings_of_plane(self, plane_index: Optional[int] = None, auto_file "total_mappings_pixels" ] - pix_indexes = inversion_plotter.inversion.brightest_pixel_list_from( + mapper = inversion_plotter.inversion.cls_list_from(cls=aa.AbstractMapper)[0] + mapper_valued = aa.MapperValued( + values=inversion_plotter.inversion.reconstruction_dict[mapper], + mapper=mapper, + ) + pix_indexes = mapper_valued.max_pixel_list_from( total_pixels=total_pixels, filter_neighbors=True ) diff --git a/autolens/interferometer/plot/fit_interferometer_plotters.py b/autolens/interferometer/plot/fit_interferometer_plotters.py index af3dafd86..0bfd1fb7e 100644 --- a/autolens/interferometer/plot/fit_interferometer_plotters.py +++ b/autolens/interferometer/plot/fit_interferometer_plotters.py @@ -229,7 +229,12 @@ def subplot_mappings_of_plane( "total_mappings_pixels" ] - pix_indexes = inversion_plotter.inversion.brightest_pixel_list_from( + mapper = inversion_plotter.inversion.cls_list_from(cls=aa.AbstractMapper)[0] + mapper_valued = aa.MapperValued( + values=inversion_plotter.inversion.reconstruction_dict[mapper], + mapper=mapper, + ) + pix_indexes = mapper_valued.max_pixel_list_from( total_pixels=total_pixels, filter_neighbors=True ) diff --git a/autolens/lens/to_inversion.py b/autolens/lens/to_inversion.py index 9bac26971..c9b1ca83e 100644 --- a/autolens/lens/to_inversion.py +++ b/autolens/lens/to_inversion.py @@ -376,7 +376,6 @@ def traced_mesh_grid_pg_list(self) -> List[List]: """ if self.preloads.image_plane_mesh_grid_pg_list is None: image_plane_mesh_grid_pg_list = self.image_plane_mesh_grid_pg_list - else: image_plane_mesh_grid_pg_list = self.preloads.image_plane_mesh_grid_pg_list @@ -441,12 +440,15 @@ def mapper_galaxy_dict(self) -> Dict[aa.AbstractMapper, ag.Galaxy]: if self.preloads.traced_mesh_grids_list_of_planes is None: traced_mesh_grids_list_of_planes = self.traced_mesh_grid_pg_list - image_plane_mesh_grid_list = self.image_plane_mesh_grid_pg_list else: traced_mesh_grids_list_of_planes = ( self.preloads.traced_mesh_grids_list_of_planes ) - image_plane_mesh_grid_list = self.preloads.image_plane_mesh_grid_list + + if self.preloads.image_plane_mesh_grid_pg_list is None: + image_plane_mesh_grid_list = self.image_plane_mesh_grid_pg_list + else: + image_plane_mesh_grid_list = self.preloads.image_plane_mesh_grid_pg_list for plane_index, galaxies in enumerate(self.planes): if galaxies.has(cls=aa.Pixelization):