Skip to content

Commit

Permalink
settings inversio passed to PLaneToInversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Dec 20, 2023
1 parent 6fd8e7a commit cdd83f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions autolens/lens/to_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def lp_linear_func_list_galaxy_dict(
grid=traced_grids_of_planes_list[plane_index],
blurring_grid=traced_blurring_grids_of_planes_list[plane_index],
noise_map=self.noise_map,
settings_inversion=self.settings_inversion,
)

lp_linear_galaxy_dict_of_plane = (
Expand Down Expand Up @@ -110,6 +111,7 @@ def image_plane_mesh_grid_pg_list(self) -> List[List]:
plane=plane,
grid_pixelization=self.dataset.grid,
noise_map=self.noise_map,
settings_inversion=self.settings_inversion,
)

image_plane_mesh_grid_list = plane_to_inversion.image_plane_mesh_grid_list
Expand Down Expand Up @@ -182,6 +184,7 @@ def mapper_galaxy_dict(self) -> Dict[aa.AbstractMapper, ag.Galaxy]:
grid_pixelization=traced_grids_of_planes_list[plane_index],
preloads=self.preloads,
noise_map=self.noise_map,
settings_inversion=self.settings_inversion,
)

galaxies_with_pixelization_list = plane.galaxies_with_cls_list_from(
Expand Down
1 change: 1 addition & 0 deletions test_autolens/analysis/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def test__relocate_pix_border__determines_if_border_pixel_relocation_is_used(mas

analysis = al.AnalysisImaging(
dataset=masked_imaging_7x7,
settings_inversion=al.SettingsInversion(relocate_pix_border=False),
)

analysis.dataset.grid_pixelization[4] = np.array([300.0, 0.0])
Expand Down
1 change: 0 additions & 1 deletion test_autolens/config/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ inversion:
use_positive_only_solver: false # If True, inversion's use a positive-only linear algebra solver by default, which is slower but prevents unphysical negative values in the reconstructed solutuion.
no_regularization_add_to_curvature_diag_value: 1.0e-8 # The default value added to the curvature matrix's diagonal when regularization is not applied to a linear object, which prevents inversion's failing due to the matrix being singular.
positive_only_uses_p_initial: false # If True, the positive-only solver of an inversion's uses an initial guess of the reconstructed data's values as which values should be positive, speeding up the solver.
relocate_pix_border: false # If True, by default a pixelization's border is used to relocate all pixels outside its border to the border.
model:
ignore_prior_limits: true
numba:
Expand Down

0 comments on commit cdd83f1

Please sign in to comment.