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
21 changes: 21 additions & 0 deletions autogalaxy/config/priors/mesh/rectangular_uniform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RectangularUniform:
shape_0:
type: Uniform
lower_limit: 20.0
upper_limit: 45.0
width_modifier:
type: Absolute
value: 8.0
limits:
lower: 3.0
upper: inf
shape_1:
type: Uniform
lower_limit: 20.0
upper_limit: 45.0
width_modifier:
type: Absolute
value: 8.0
limits:
lower: 3.0
upper: inf
2 changes: 1 addition & 1 deletion autogalaxy/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def make_galaxies_x2_7x7():
def make_galaxies_x2_inversion_7x7():
source_gal_inversion = ag.Galaxy(
redshift=1.0,
pixelization=ag.mesh.Rectangular(),
pixelization=ag.mesh.RectangularUniform(),
regularization=ag.reg.Constant(),
)

Expand Down
2 changes: 0 additions & 2 deletions test_autogalaxy/analysis/test_plotter_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ def test__inversion(

assert path.join(plot_path, "subplot_inversion_0.png") in plot_patch.paths

print(plot_path)

with open(
path.join(plot_path, "source_plane_reconstruction_0.csv"), mode="r"
) as file:
Expand Down
8 changes: 4 additions & 4 deletions test_autogalaxy/galaxy/test_to_inversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test__image_plane_mesh_grid_list(masked_imaging_7x7):


def test__mapper_galaxy_dict(masked_imaging_7x7):
mesh = ag.mesh.Rectangular(shape=(3, 3))
mesh = ag.mesh.RectangularUniform(shape=(3, 3))

pixelization = ag.m.MockPixelization(mesh=mesh)

Expand All @@ -118,7 +118,7 @@ def test__mapper_galaxy_dict(masked_imaging_7x7):
assert mapper_list[0].pixels == 9
assert mapper_galaxy_dict[mapper_list[0]] == galaxy_pix

mesh = ag.mesh.Rectangular(shape=(4, 3))
mesh = ag.mesh.RectangularUniform(shape=(4, 3))
pixelization = ag.m.MockPixelization(mesh=mesh)

galaxy_pix_2 = ag.Galaxy(redshift=0.5, pixelization=pixelization)
Expand Down Expand Up @@ -166,7 +166,7 @@ def test__inversion_imaging_from(grid_2d_7x7, masked_imaging_7x7):
assert inversion.reconstruction[0] == pytest.approx(0.186868464426, 1.0e-2)

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

Expand Down Expand Up @@ -205,7 +205,7 @@ def test__inversion_interferometer_from(grid_2d_7x7, interferometer_7):
interferometer_7.data = ag.Visibilities.ones(shape_slim=(7,))

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

Expand Down
10 changes: 5 additions & 5 deletions test_autogalaxy/imaging/test_fit_imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test__fit_figure_of_merit(
assert fit.figure_of_merit == pytest.approx(-71.46911964, 1.0e-4)

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

Expand Down Expand Up @@ -219,7 +219,7 @@ def test__fit__model_dataset__grid_offset__handles_special_behaviour(
assert fit.figure_of_merit == pytest.approx(-14.93272811, 1.0e-4)

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

Expand Down Expand Up @@ -296,7 +296,7 @@ def test__galaxy_model_image_dict(masked_imaging_7x7):
# Pixelization + Regularizaiton only

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

Expand All @@ -322,7 +322,7 @@ def test__galaxy_model_image_dict(masked_imaging_7x7):
g1_linear = ag.Galaxy(redshift=0.5, bulge=ag.lp_linear.Sersic(centre=(0.05, 0.05)))

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

Expand Down Expand Up @@ -372,7 +372,7 @@ def test__model_images_of_galaxies_list(masked_imaging_7x7):
galaxy_linear = ag.Galaxy(redshift=0.5, bulge=ag.lp_linear.Sersic())

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

Expand Down
2 changes: 1 addition & 1 deletion test_autogalaxy/imaging/test_simulate_and_fit_imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test__simulate_imaging_data_and_fit__known_likelihood():
)

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

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

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

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

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

Expand Down Expand Up @@ -154,7 +154,7 @@ def test___galaxy_model_image_dict(interferometer_7):
# Pixelization + Regularizaiton only

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

Expand Down Expand Up @@ -195,7 +195,7 @@ def test___galaxy_model_image_dict(interferometer_7):
# Linear Light PRofiles + Pixelization + Regularizaiton

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

Expand Down Expand Up @@ -280,7 +280,7 @@ def test___galaxy_model_visibilities_dict(interferometer_7):
# Pixelization + Regularizaiton only

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

Expand Down Expand Up @@ -320,7 +320,7 @@ def test___galaxy_model_visibilities_dict(interferometer_7):

# Linear Light PRofiles + Pixelization + Regularizaiton
pixelization = ag.Pixelization(
mesh=ag.mesh.Rectangular(shape=(3, 3)),
mesh=ag.mesh.RectangularUniform(shape=(3, 3)),
regularization=ag.reg.Constant(coefficient=2.0),
)

Expand Down Expand Up @@ -362,7 +362,7 @@ def test__model_visibilities_of_galaxies_list(interferometer_7):
galaxy_linear = ag.Galaxy(redshift=0.5, bulge=ag.lp_linear.Sersic())

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

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

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

Expand Down Expand Up @@ -115,7 +115,7 @@ def test__simulate_interferometer_data_and_fit__known_likelihood():
)

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

Expand Down
Loading