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 config/priors/mesh/rectangular_bilinear_adapt_density.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RectangularBilinearAdaptDensity:
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
40 changes: 40 additions & 0 deletions config/priors/mesh/rectangular_bilinear_adapt_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
RectangularBilinearAdaptImage:
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
weight_power:
type : Uniform
lower_limit: 0.0
upper_limit: 10.0
width_modifier:
type: Absolute
value: 2.0
limits:
lower: -100.0
upper: 100.0
weight_floor:
type: LogUniform
lower_limit: 0.00001
upper_limit: 1.0
width_modifier:
type: Absolute
limits:
lower: 0.0
upper: inf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RectangularAdaptDensity:
RectangularRTUAdaptDensity:
shape_0:
type: Uniform
lower_limit: 20.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RectangularAdaptImage:
RectangularRTUAdaptImage:
shape_0:
type: Uniform
lower_limit: 20.0
Expand Down
4 changes: 2 additions & 2 deletions scripts/imaging/jax_likelihood/rectangular.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Verify that JAX can compute the log-likelihood of an ``Imaging`` fit for an
autogalaxy model that uses an adapt-image rectangular pixelization
(``RectangularAdaptImage`` + ``Adapt`` regularization).
(``RectangularBilinearAdaptImage`` + ``Adapt`` regularization).

Two paths are exercised:

Expand Down Expand Up @@ -83,7 +83,7 @@
Single galaxy with an adapt-image rectangular pixelization. The mesh shape is
fixed (28 x 28) per the JAX static-shape requirement.
"""
mesh = ag.mesh.RectangularAdaptImage(shape=(28, 28), weight_power=1.0)
mesh = ag.mesh.RectangularBilinearAdaptImage(shape=(28, 28), weight_power=1.0)
regularization = ag.reg.Adapt()
pixelization = ag.Pixelization(mesh=mesh, regularization=regularization)

Expand Down
4 changes: 2 additions & 2 deletions scripts/imaging/jax_likelihood/rectangular_mge.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Two-galaxy autogalaxy model: a foreground galaxy with an MGE bulge and a
second galaxy with an adapt-image rectangular pixelization
(``RectangularAdaptImage`` + ``Constant`` regularization).
(``RectangularBilinearAdaptImage`` + ``Constant`` regularization).

This is the multi-pixelization regression case the path-tuple library fix
was made for: prior to the fix the autolens fallback would silently return
Expand Down Expand Up @@ -108,7 +108,7 @@

galaxy_0 = af.Model(ag.Galaxy, redshift=0.5, bulge=bulge)

mesh = ag.mesh.RectangularAdaptImage(shape=(28, 28))
mesh = ag.mesh.RectangularBilinearAdaptImage(shape=(28, 28))
regularization = ag.reg.Constant(coefficient=1.0)
pixelization = ag.Pixelization(mesh=mesh, regularization=regularization)

Expand Down
4 changes: 2 additions & 2 deletions scripts/imaging/visualization/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

2. ``visualize`` runs once per galaxy type, each writing into its own subfolder:
visualization/parametric/ — Sersic light-profile galaxy
visualization/rectangular/ — RectangularAdaptImage pixelization
visualization/rectangular/ — RectangularBilinearAdaptImage pixelization
visualization/delaunay/ — Delaunay pixelization

Each subfolder contains only the per-run comparison plots:
Expand Down Expand Up @@ -117,7 +117,7 @@
model_parametric = af.Collection(galaxies=af.Collection(galaxy=galaxy_parametric))

# --- Rectangular pixelization ---
mesh_rect = ag.mesh.RectangularAdaptImage(shape=(22, 22))
mesh_rect = ag.mesh.RectangularBilinearAdaptImage(shape=(22, 22))
reg_rect = ag.reg.Constant(coefficient=1.0)
pix_rect = ag.Pixelization(mesh=mesh_rect, regularization=reg_rect)
galaxy_rectangular = af.Model(ag.Galaxy, redshift=0.5, pixelization=pix_rect)
Expand Down
4 changes: 2 additions & 2 deletions scripts/interferometer/jax_likelihood/rectangular.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Verify that JAX can compute the log-likelihood of an ``Interferometer`` fit for
an autogalaxy model that uses an adapt-image rectangular pixelization
(``RectangularAdaptImage`` + ``Adapt`` regularization).
(``RectangularBilinearAdaptImage`` + ``Adapt`` regularization).

Two paths are exercised:

Expand Down Expand Up @@ -86,7 +86,7 @@
Single galaxy with an adapt-image rectangular pixelization. The mesh shape is
fixed (28 x 28) per the JAX static-shape requirement.
"""
mesh = ag.mesh.RectangularAdaptImage(shape=(28, 28), weight_power=1.0)
mesh = ag.mesh.RectangularBilinearAdaptImage(shape=(28, 28), weight_power=1.0)
regularization = ag.reg.Adapt()
pixelization = ag.Pixelization(mesh=mesh, regularization=regularization)

Expand Down
4 changes: 2 additions & 2 deletions scripts/interferometer/jax_likelihood/rectangular_mge.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Two-galaxy autogalaxy model: a foreground galaxy with an MGE bulge and a
second galaxy with an adapt-image rectangular pixelization
(``RectangularAdaptImage`` + ``Constant`` regularization).
(``RectangularBilinearAdaptImage`` + ``Constant`` regularization).

This is the multi-pixelization regression case the path-tuple library fix
was made for: prior to the fix the fallback would silently return the wrong
Expand Down Expand Up @@ -103,7 +103,7 @@

galaxy_0 = af.Model(ag.Galaxy, redshift=0.5, bulge=bulge)

mesh = ag.mesh.RectangularAdaptImage(shape=(28, 28))
mesh = ag.mesh.RectangularBilinearAdaptImage(shape=(28, 28))
regularization = ag.reg.Constant(coefficient=1.0)
pixelization = ag.Pixelization(mesh=mesh, regularization=regularization)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RectangularBilinearAdaptDensity:
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
RectangularBilinearAdaptImage:
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
weight_power:
type : Uniform
lower_limit: 0.0
upper_limit: 10.0
width_modifier:
type: Absolute
value: 2.0
limits:
lower: -100.0
upper: 100.0
weight_floor:
type: LogUniform
lower_limit: 0.00001
upper_limit: 1.0
width_modifier:
type: Absolute
limits:
lower: 0.0
upper: inf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RectangularAdaptDensity:
RectangularRTUAdaptDensity:
shape_0:
type: Uniform
lower_limit: 20.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RectangularAdaptImage:
RectangularRTUAdaptImage:
shape_0:
type: Uniform
lower_limit: 20.0
Expand Down
4 changes: 2 additions & 2 deletions scripts/multi_dataset/jax_likelihood/rectangular.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Verify that JAX can compute the log-likelihood of a multi-wavelength
``Imaging`` fit for an autogalaxy model using an adapt-image rectangular
pixelization (``RectangularAdaptImage`` + ``Adapt`` regularization).
pixelization (``RectangularBilinearAdaptImage`` + ``Adapt`` regularization).
Two paths are exercised:

1. ``fitness._vmap`` batch evaluation over a ``af.FactorGraphModel`` that
Expand Down Expand Up @@ -111,7 +111,7 @@
"""
pixelization = af.Model(
ag.Pixelization,
mesh=ag.mesh.RectangularAdaptImage(shape=mesh_shape, weight_power=1.0),
mesh=ag.mesh.RectangularBilinearAdaptImage(shape=mesh_shape, weight_power=1.0),
regularization=ag.reg.Adapt,
)

Expand Down
2 changes: 1 addition & 1 deletion scripts/multi_dataset/jax_likelihood/rectangular_mge.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

pixelization = af.Model(
ag.Pixelization,
mesh=ag.mesh.RectangularAdaptImage(shape=mesh_shape, weight_power=1.0),
mesh=ag.mesh.RectangularBilinearAdaptImage(shape=mesh_shape, weight_power=1.0),
regularization=ag.reg.Adapt,
)

Expand Down
Loading