Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Dec 15, 2024
1 parent 6abc996 commit f8458f1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion autogalaxy/config/visualize/plots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dataset: # Settings for plots of all datasets
noise_map: false # Plot the individual noise-map of every dataset?
signal_to_noise_map: false # Plot the individual signal-to-noise-map of every dataset?
over_sampling: false # Plot the over-sampling sub-size, used to evaluate light profiles, of every dataset?
over_sampling_non_uniform: false # Plot the over-sampling sub-size, used to evaluate non uniform grids, of every dataset?
over_sampling_pixelization: false # Plot the over-sampling sub-size, used to evaluate pixelizations, of every dataset?
imaging: # Settings for plots of imaging datasets (e.g. ImagingPlotter).
psf: false
Expand Down
10 changes: 10 additions & 0 deletions autogalaxy/galaxy/galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,16 @@ def traced_grid_2d_from(self, grid: aa.type.Grid2DLike) -> aa.type.Grid2DLike:
"""
Trace an input grid using the galaxy's its deflection angles.
"""
if isinstance(grid, aa.Grid2D):
return aa.Grid2D(
values=grid - self.deflections_yx_2d_from(grid=grid),
mask=grid.mask,
over_sampling_size=grid.over_sampling_size,
grid_over_sampled=grid.grid_over_sampled - self.deflections_yx_2d_from(
grid=grid.grid_over_sampled
)
)

return grid - self.deflections_yx_2d_from(grid=grid)

@aa.grid_dec.to_projected
Expand Down
3 changes: 1 addition & 2 deletions autogalaxy/galaxy/to_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ def mapper_from(

return mapper_from(
mapper_grids=mapper_grids,
over_sampler=self.dataset.grids.pixelization.over_sampler,
regularization=regularization,
run_time_dict=self.run_time_dict,
)
Expand Down Expand Up @@ -558,7 +557,7 @@ def mapper_galaxy_dict(self) -> Dict[aa.AbstractMapper, Galaxy]:
mapper = self.mapper_from(
mesh=pixelization_list[mapper_index].mesh,
regularization=pixelization_list[mapper_index].regularization,
source_plane_data_grid=self.dataset.grids.pixelization.grid_over_sampled,
source_plane_data_grid=self.dataset.grids.pixelization,
source_plane_mesh_grid=mesh_grid_list[mapper_index],
adapt_galaxy_image=adapt_galaxy_image,
image_plane_mesh_grid=mesh_grid_list[mapper_index],
Expand Down
1 change: 0 additions & 1 deletion autogalaxy/imaging/model/plotter_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def should_plot(name):
psf=should_plot("psf"),
signal_to_noise_map=should_plot("signal_to_noise_map"),
over_sampling=should_plot("over_sampling"),
over_sampling_non_uniform=should_plot("over_sampling_non_uniform"),
over_sampling_pixelization=should_plot("over_sampling_pixelization"),
)

Expand Down
2 changes: 0 additions & 2 deletions test_autogalaxy/interferometer/test_fit_interferometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ def test___galaxy_model_image_dict(interferometer_7):

mapper = ag.Mapper(
mapper_grids=mapper_grids,
over_sampler=interferometer_7.grids.pixelization.over_sampler,
border_relocator=interferometer_7.grids.border_relocator,
regularization=pixelization.regularization,
)
Expand Down Expand Up @@ -321,7 +320,6 @@ def test___galaxy_model_visibilities_dict(interferometer_7):

mapper = ag.Mapper(
mapper_grids=mapper_grids,
over_sampler=interferometer_7.grids.pixelization.over_sampler,
border_relocator=interferometer_7.grids.border_relocator,
regularization=pixelization.regularization,
)
Expand Down
2 changes: 2 additions & 0 deletions test_autogalaxy/operate/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def test__unmasked_blurred_image_2d_from():
assert unmasked_blurred_image_2d == pytest.approx(image_2d_manual, 1.0e-4)



def test__visibilities_from_grid_and_transformer(grid_2d_7x7, transformer_7x7_7):
lp = ag.lp.Sersic(intensity=1.0)
lp_visibilities = lp.visibilities_from(
Expand Down Expand Up @@ -276,6 +277,7 @@ def test__unmasked_blurred_image_2d_list_from():
)



def test__visibilities_list_from(grid_2d_7x7, transformer_7x7_7):
lp_0 = ag.lp.Sersic(intensity=1.0)
lp_1 = ag.lp.Sersic(intensity=2.0)
Expand Down

0 comments on commit f8458f1

Please sign in to comment.