Skip to content

Commit

Permalink
fix some plotters
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Nov 5, 2024
1 parent 8399500 commit 12b4dc2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
7 changes: 6 additions & 1 deletion autolens/imaging/plot/fit_imaging_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
7 changes: 6 additions & 1 deletion autolens/interferometer/plot/fit_interferometer_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
8 changes: 5 additions & 3 deletions autolens/lens/to_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 12b4dc2

Please sign in to comment.