Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autolens/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def make_tracer_x2_plane_7x7():

def make_tracer_x2_plane_inversion_7x7():
pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(), regularization=al.reg.Constant()
mesh=al.mesh.RectangularUniform(), regularization=al.reg.Constant()
)

source_gal_inversion = al.Galaxy(redshift=1.0, pixelization=pixelization)
Expand Down
2 changes: 1 addition & 1 deletion test_autolens/analysis/analysis/test_analysis_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test__modify_before_fit__inversion_no_positions_likelihood__raises_exception
lens = al.Galaxy(redshift=0.5, mass=al.mp.IsothermalSph())

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(), regularization=al.reg.Constant()
mesh=al.mesh.RectangularUniform(), regularization=al.reg.Constant()
)

source = al.Galaxy(redshift=1.0, pixelization=pixelization)
Expand Down
4 changes: 2 additions & 2 deletions test_autolens/analysis/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test__use_border_relocator__determines_if_border_pixel_relocation_is_used(
masked_imaging_7x7,
):
pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -128,7 +128,7 @@ def test__modify_before_fit__inversion_no_positions_likelihood__raises_exception
lens = al.Galaxy(redshift=0.5, mass=al.mp.IsothermalSph())

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(), regularization=al.reg.Constant()
mesh=al.mesh.RectangularUniform(), regularization=al.reg.Constant()
)

source = al.Galaxy(redshift=1.0, pixelization=pixelization)
Expand Down
4 changes: 2 additions & 2 deletions test_autolens/analysis/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test__source_plane_inversion_centre(analysis_imaging_7x7):
lens = al.Galaxy(redshift=0.5, light=al.lp.SersicSph(intensity=1.0))

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular((3, 3)),
mesh=al.mesh.RectangularUniform((3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -151,7 +151,7 @@ def test__source_plane_centre(analysis_imaging_7x7):
lens = al.Galaxy(redshift=0.5, light=al.lp.SersicSph(intensity=1.0))

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular((3, 3)),
mesh=al.mesh.RectangularUniform((3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down
16 changes: 8 additions & 8 deletions test_autolens/imaging/test_fit_imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test__fit_figure_of_merit(masked_imaging_7x7, masked_imaging_covariance_7x7)
assert fit.figure_of_merit == pytest.approx(-648.4814555620, 1.0e-4)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand All @@ -86,7 +86,7 @@ def test__fit_figure_of_merit(masked_imaging_7x7, masked_imaging_covariance_7x7)
galaxy_light = al.Galaxy(redshift=0.5, bulge=al.lp.Sersic(centre=(0.05, 0.05), intensity=1.0))

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -256,7 +256,7 @@ def test__fit_figure_of_merit__sub_2(image_7x7, psf_3x3, noise_map_7x7, mask_2d_
assert fit.figure_of_merit == pytest.approx(-41.60614104506277, 1.0e-4)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand All @@ -272,7 +272,7 @@ def test__fit_figure_of_merit__sub_2(image_7x7, psf_3x3, noise_map_7x7, mask_2d_
galaxy_light = al.Galaxy(redshift=0.5, bulge=al.lp.Sersic(intensity=1.0))

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -448,7 +448,7 @@ def test__fit__model_dataset__grid_offset__handles_special_behaviour(masked_imag
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -530,7 +530,7 @@ def test__galaxy_model_image_dict(masked_imaging_7x7):
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -663,7 +663,7 @@ def test__model_images_of_planes_list(masked_imaging_7x7_sub_2):
g1_linear = al.Galaxy(redshift=0.75, bulge=al.lp_linear.Sersic())

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -806,7 +806,7 @@ def test__total_mappers(masked_imaging_7x7):

assert fit.total_mappers == 0

pixelization = al.Pixelization(mesh=al.mesh.Rectangular())
pixelization = al.Pixelization(mesh=al.mesh.RectangularUniform())

g2 = al.Galaxy(redshift=2.0, pixelization=pixelization)

Expand Down
10 changes: 5 additions & 5 deletions test_autolens/imaging/test_simulate_and_fit_imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test__simulate_imaging_data_and_fit__known_likelihood():
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(16, 16)),
mesh=al.mesh.RectangularUniform(shape=(16, 16)),
regularization=al.reg.Constant(coefficient=(1.0)),
)

Expand Down Expand Up @@ -273,7 +273,7 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization(
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=0.01),
)

Expand Down Expand Up @@ -403,7 +403,7 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization_
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=0.01),
)

Expand Down Expand Up @@ -552,14 +552,14 @@ def test__simulate_imaging_data_and_fit__complex_fit_compare_mapping_matrix_w_ti
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

source_0 = al.Galaxy(redshift=0.4, pixelization=pixelization)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down
10 changes: 5 additions & 5 deletions test_autolens/interferometer/test_fit_interferometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test__fit_figure_of_merit(interferometer_7):
assert fit.figure_of_merit == pytest.approx(-12779.937568696, 1.0e-4)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=0.01),
)

Expand All @@ -79,7 +79,7 @@ def test__fit_figure_of_merit(interferometer_7):
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -192,7 +192,7 @@ def test___galaxy_model_image_dict(interferometer_7, interferometer_7_grid):
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -316,7 +316,7 @@ def test__galaxy_model_visibilities_dict(interferometer_7, interferometer_7_grid
# Pixelization + Regularizaiton only

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -374,7 +374,7 @@ def test__model_visibilities_of_planes_list(interferometer_7):
g1_linear = al.Galaxy(redshift=0.75, bulge=al.lp_linear.Sersic())

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test__perfect_fit__chi_squared_0():
assert fit.chi_squared == pytest.approx(0.0)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(7, 7)),
mesh=al.mesh.RectangularUniform(shape=(7, 7)),
regularization=al.reg.Constant(coefficient=0.0001),
)

Expand Down Expand Up @@ -113,7 +113,7 @@ def test__simulate_interferometer_data_and_fit__known_likelihood():
grid = al.Grid2D.from_mask(mask=mask, over_sample_size=1)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(16, 16)),
mesh=al.mesh.RectangularUniform(shape=(16, 16)),
regularization=al.reg.Constant(coefficient=1.0),
)

Expand Down Expand Up @@ -290,7 +290,7 @@ def test__simulate_interferometer_data_and_fit__linear_light_profiles_and_pixeli
)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=0.01),
)

Expand Down
22 changes: 14 additions & 8 deletions test_autolens/lens/test_to_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test__lp_linear_func_galaxy_dict_from(masked_imaging_7x7):


def test__cls_pg_list_from(masked_imaging_7x7, grid_2d_7x7):
mesh_0 = al.mesh.Rectangular(shape=(3, 3))
mesh_0 = al.mesh.RectangularUniform(shape=(3, 3))

pixelization_0 = al.Pixelization(mesh=mesh_0)

Expand All @@ -132,11 +132,11 @@ def test__cls_pg_list_from(masked_imaging_7x7, grid_2d_7x7):
assert pixelization_list[0] == []
assert pixelization_list[1][0].mesh.pixels == 9

mesh_1 = al.mesh.Rectangular(shape=(4, 3))
mesh_1 = al.mesh.RectangularUniform(shape=(4, 3))

pixelization_1 = al.Pixelization(mesh=mesh_1)

mesh_2 = al.mesh.Rectangular(shape=(4, 4))
mesh_2 = al.mesh.RectangularUniform(shape=(4, 4))

pixelization_2 = al.Pixelization(mesh=mesh_2)

Expand Down Expand Up @@ -392,15 +392,21 @@ def test__mapper_galaxy_dict(masked_imaging_7x7):

galaxy_no_pix = al.Galaxy(redshift=0.5)

pixelization_0 = al.m.MockPixelization(mesh=al.mesh.Rectangular(shape=(3, 3)))
pixelization_0 = al.m.MockPixelization(
mesh=al.mesh.RectangularUniform(shape=(3, 3))
)

galaxy_pix_0 = al.Galaxy(redshift=0.5, pixelization=pixelization_0)

pixelization_1 = al.m.MockPixelization(mesh=al.mesh.Rectangular(shape=(4, 3)))
pixelization_1 = al.m.MockPixelization(
mesh=al.mesh.RectangularUniform(shape=(4, 3))
)

galaxy_pix_1 = al.Galaxy(redshift=1.0, pixelization=pixelization_1)

pixelization_2 = al.m.MockPixelization(mesh=al.mesh.Rectangular(shape=(4, 4)))
pixelization_2 = al.m.MockPixelization(
mesh=al.mesh.RectangularUniform(shape=(4, 4))
)

galaxy_pix_2 = al.Galaxy(redshift=1.0, pixelization=pixelization_2)

Expand Down Expand Up @@ -492,7 +498,7 @@ def test__inversion_imaging_from(grid_2d_7x7, masked_imaging_7x7):
assert inversion.reconstruction[0] == pytest.approx(0.186868464426, 1.0e-2)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(3, 3)),
mesh=al.mesh.RectangularUniform(shape=(3, 3)),
regularization=al.reg.Constant(coefficient=0.0),
)

Expand Down Expand Up @@ -547,7 +553,7 @@ def test__inversion_interferometer_from(grid_2d_7x7, interferometer_7):
assert inversion.reconstruction[0] == pytest.approx(0.0412484695, 1.0e-5)

pixelization = al.Pixelization(
mesh=al.mesh.Rectangular(shape=(7, 7)),
mesh=al.mesh.RectangularUniform(shape=(7, 7)),
regularization=al.reg.Constant(coefficient=0.0),
)

Expand Down
Loading