Skip to content

Commit 133083c

Browse files
committed
simplify API
1 parent 196a44a commit 133083c

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

autolens/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def make_grid_2d_7x7():
7-
return aa.Grid2D.from_mask(mask=make_mask_2d_7x7(), over_sampling_size=1)
7+
return aa.Grid2D.from_mask(mask=make_mask_2d_7x7(), over_sample_size=1)
88

99

1010
def make_positions_x2():

autolens/imaging/simulator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ def via_deflections_and_galaxies_from(self, deflections : aa.VectorYX2D, galaxie
110110
grid = aa.Grid2D.uniform(
111111
shape_native=deflections.shape_native,
112112
pixel_scales=deflections.pixel_scales,
113-
over_sampling_size=1
113+
over_sample_size=1
114114
)
115115

116116
deflected_grid = aa.Grid2D(
117117
values=grid - deflections,
118118
mask=grid.mask,
119-
over_sampling_size=1,
119+
over_sample_size=1,
120120
over_sampled=grid - deflections
121121
)
122122

autolens/interferometer/simulator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ def via_deflections_and_galaxies_from(
8181
grid = aa.Grid2D.uniform(
8282
shape_native=deflections.shape_native,
8383
pixel_scales=deflections.pixel_scales,
84-
over_sampling_size=1,
84+
over_sample_size=1,
8585
)
8686

8787
deflected_grid = aa.Grid2D(
8888
values=grid - deflections,
8989
mask=grid.mask,
90-
over_sampling_size=1,
90+
over_sample_size=1,
9191
over_sampled=grid - deflections,
9292
)
9393

autolens/lens/tracer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def traced_grid_2d_list_from(
285285
values=grid_2d_list[i],
286286
mask=grid.mask,
287287
over_sampled=grid_2d_over_sampled_list[i],
288-
over_sampling_size=grid.over_sampling_size,
288+
over_sample_size=grid.over_sample_size,
289289
)
290290

291291
grid_2d_new_list.append(grid_2d_new)

test_autolens/analysis/test_preloads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test__set_traced_grids_of_planes():
1010
grid = al.Grid2D.no_mask(
1111
values=np.array([[[1.0, 1.0]]]),
1212
pixel_scales=1.0,
13-
over_sampling_size=1,
13+
over_sample_size=1,
1414
)
1515

1616
# traced grids is None so no Preloading.

test_autolens/imaging/test_simulate_and_fit_imaging.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
def test__perfect_fit__chi_squared_0():
1111

12-
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sampling_size=1)
12+
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sample_size=1)
1313

1414
psf = al.Kernel2D.from_gaussian(
1515
shape_native=(3, 3), pixel_scales=0.2, sigma=0.75, normalize=True
@@ -123,7 +123,7 @@ def test__simulate_imaging_data_and_fit__known_likelihood():
123123

124124
def test__simulate_imaging_data_and_fit__linear_light_profiles_agree_with_standard_light_profiles():
125125

126-
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sampling_size=1)
126+
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sample_size=1)
127127

128128
psf = al.Kernel2D.from_gaussian(
129129
shape_native=(3, 3), pixel_scales=0.2, sigma=0.75, normalize=True
@@ -232,7 +232,7 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_agree_with_standa
232232

233233
def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization():
234234

235-
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sampling_size=1)
235+
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sample_size=1)
236236

237237
psf = al.Kernel2D.from_gaussian(
238238
shape_native=(3, 3), pixel_scales=0.2, sigma=0.75, normalize=True
@@ -387,7 +387,7 @@ def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization(
387387

388388
def test__simulate_imaging_data_and_fit__linear_light_profiles_and_pixelization__sub_2():
389389

390-
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sampling_size=2)
390+
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2, over_sample_size=2)
391391

392392
psf = al.Kernel2D.from_gaussian(
393393
shape_native=(3, 3), pixel_scales=0.2, sigma=0.75, normalize=True
@@ -667,7 +667,7 @@ def test__simulate_imaging_data_and_fit__complex_fit_compare_mapping_matrix_w_ti
667667
def test__fit_figure_of_merit__mge_mass_model(masked_imaging_7x7, masked_imaging_covariance_7x7):
668668

669669
grid = al.Grid2D.uniform(shape_native=(11, 11), pixel_scales=0.2,
670-
over_sampling_size=8)
670+
over_sample_size=8)
671671

672672
psf = al.Kernel2D.from_gaussian(
673673
shape_native=(3, 3), pixel_scales=0.2, sigma=0.75, normalize=True

test_autolens/interferometer/test_simulate_and_fit_interferometer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
def test__perfect_fit__chi_squared_0():
1111
grid = al.Grid2D.uniform(
12-
shape_native=(51, 51), pixel_scales=0.1, over_sampling_size=1
12+
shape_native=(51, 51), pixel_scales=0.1, over_sample_size=1
1313
)
1414

1515
lens_galaxy = al.Galaxy(
@@ -110,7 +110,7 @@ def test__perfect_fit__chi_squared_0():
110110
def test__simulate_interferometer_data_and_fit__known_likelihood():
111111
mask = al.Mask2D.circular(radius=3.0, shape_native=(31, 31), pixel_scales=0.2)
112112

113-
grid = al.Grid2D.from_mask(mask=mask, over_sampling_size=1)
113+
grid = al.Grid2D.from_mask(mask=mask, over_sample_size=1)
114114

115115
pixelization = al.Pixelization(
116116
mesh=al.mesh.Rectangular(shape=(16, 16)),
@@ -146,7 +146,7 @@ def test__simulate_interferometer_data_and_fit__known_likelihood():
146146

147147
def test__simulate_interferometer_data_and_fit__linear_light_profiles_agree_with_standard_light_profiles():
148148
grid = al.Grid2D.uniform(
149-
shape_native=(51, 51), pixel_scales=0.1, over_sampling_size=1
149+
shape_native=(51, 51), pixel_scales=0.1, over_sample_size=1
150150
)
151151

152152
lens_galaxy = al.Galaxy(
@@ -251,7 +251,7 @@ def test__simulate_interferometer_data_and_fit__linear_light_profiles_agree_with
251251

252252
def test__simulate_interferometer_data_and_fit__linear_light_profiles_and_pixelization():
253253
grid = al.Grid2D.uniform(
254-
shape_native=(51, 51), pixel_scales=0.1, over_sampling_size=1
254+
shape_native=(51, 51), pixel_scales=0.1, over_sample_size=1
255255
)
256256

257257
lens_galaxy = al.Galaxy(

test_autolens/interferometer/test_simulator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test__from_tracer__same_as_tracer_input():
3636

3737
def test__via_deflections_and_galaxies_from__same_as_calculation_using_tracer():
3838
grid = al.Grid2D.uniform(
39-
shape_native=(20, 20), pixel_scales=0.05, over_sampling_size=1
39+
shape_native=(20, 20), pixel_scales=0.05, over_sample_size=1
4040
)
4141

4242
lens_galaxy = al.Galaxy(redshift=0.5, mass=al.mp.Isothermal(einstein_radius=1.6))

test_autolens/lens/test_tracer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def test__image_2d_from__operated_only_input(grid_2d_7x7, lp_0, lp_operated_0, m
257257

258258

259259
def test__image_2d_from__sum_of_individual_images(mask_2d_7x7):
260-
grid_2d_7x7 = al.Grid2D.from_mask(mask=mask_2d_7x7, over_sampling_size=2)
260+
grid_2d_7x7 = al.Grid2D.from_mask(mask=mask_2d_7x7, over_sample_size=2)
261261

262262
g0 = al.Galaxy(
263263
redshift=0.1,
@@ -286,7 +286,7 @@ def test__image_2d_from__sum_of_individual_images(mask_2d_7x7):
286286

287287
def test__image_2d_via_input_plane_image_from__with_foreground_planes(grid_2d_7x7):
288288
plane_grid = al.Grid2D.uniform(
289-
shape_native=(40, 40), pixel_scales=0.3, over_sampling_size=1
289+
shape_native=(40, 40), pixel_scales=0.3, over_sample_size=1
290290
)
291291

292292
g0 = al.Galaxy(
@@ -320,7 +320,7 @@ def test__image_2d_via_input_plane_image_from__without_foreground_planes(
320320
grid_2d_7x7 = al.Grid2D(
321321
values=grid_2d_7x7,
322322
mask=grid_2d_7x7.mask,
323-
over_sampling_size=2,
323+
over_sample_size=2,
324324
)
325325

326326
g0 = al.Galaxy(
@@ -356,7 +356,7 @@ def test__image_2d_via_input_plane_image_from__with_foreground_planes__multi_pla
356356
grid_2d_7x7,
357357
):
358358
plane_grid = al.Grid2D.uniform(
359-
shape_native=(40, 40), pixel_scales=0.3, over_sampling_size=1
359+
shape_native=(40, 40), pixel_scales=0.3, over_sample_size=1
360360
)
361361

362362
g0 = al.Galaxy(
@@ -462,7 +462,7 @@ def test__light_profile_snr__signal_to_noise_via_simulator_correct():
462462

463463

464464
def test__galaxy_image_2d_dict_from(grid_2d_7x7, mask_2d_7x7):
465-
grid_2d_7x7 = al.Grid2D.from_mask(mask=mask_2d_7x7, over_sampling_size=2)
465+
grid_2d_7x7 = al.Grid2D.from_mask(mask=mask_2d_7x7, over_sample_size=2)
466466

467467
g0 = al.Galaxy(redshift=0.5, light_profile=al.lp.Sersic(intensity=1.0))
468468
g1 = al.Galaxy(

0 commit comments

Comments
 (0)