diff --git a/config/priors/mesh/rectangular_bilinear_adapt_density.yaml b/config/priors/mesh/rectangular_bilinear_adapt_density.yaml new file mode 100755 index 0000000..0c38928 --- /dev/null +++ b/config/priors/mesh/rectangular_bilinear_adapt_density.yaml @@ -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 \ No newline at end of file diff --git a/config/priors/mesh/rectangular_bilinear_adapt_image.yaml b/config/priors/mesh/rectangular_bilinear_adapt_image.yaml new file mode 100755 index 0000000..71f10be --- /dev/null +++ b/config/priors/mesh/rectangular_bilinear_adapt_image.yaml @@ -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 \ No newline at end of file diff --git a/config/priors/mesh/rectangular_adapt_density.yaml b/config/priors/mesh/rectangular_rtu_adapt_density.yaml old mode 100755 new mode 100644 similarity index 88% rename from config/priors/mesh/rectangular_adapt_density.yaml rename to config/priors/mesh/rectangular_rtu_adapt_density.yaml index e78308a..47231a0 --- a/config/priors/mesh/rectangular_adapt_density.yaml +++ b/config/priors/mesh/rectangular_rtu_adapt_density.yaml @@ -1,4 +1,4 @@ -RectangularAdaptDensity: +RectangularRTUAdaptDensity: shape_0: type: Uniform lower_limit: 20.0 diff --git a/config/priors/mesh/rectangular_adapt_image.yaml b/config/priors/mesh/rectangular_rtu_adapt_image.yaml old mode 100755 new mode 100644 similarity index 91% rename from config/priors/mesh/rectangular_adapt_image.yaml rename to config/priors/mesh/rectangular_rtu_adapt_image.yaml index e8878be..1f3dd0d --- a/config/priors/mesh/rectangular_adapt_image.yaml +++ b/config/priors/mesh/rectangular_rtu_adapt_image.yaml @@ -1,4 +1,4 @@ -RectangularAdaptImage: +RectangularRTUAdaptImage: shape_0: type: Uniform lower_limit: 20.0 diff --git a/scripts/imaging/jax_likelihood/rectangular.py b/scripts/imaging/jax_likelihood/rectangular.py index a05aef2..b5c4f92 100644 --- a/scripts/imaging/jax_likelihood/rectangular.py +++ b/scripts/imaging/jax_likelihood/rectangular.py @@ -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: @@ -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) diff --git a/scripts/imaging/jax_likelihood/rectangular_mge.py b/scripts/imaging/jax_likelihood/rectangular_mge.py index 572f4e8..4a0379e 100644 --- a/scripts/imaging/jax_likelihood/rectangular_mge.py +++ b/scripts/imaging/jax_likelihood/rectangular_mge.py @@ -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 @@ -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) diff --git a/scripts/imaging/visualization/visualization.py b/scripts/imaging/visualization/visualization.py index d48b9a6..c11d9ab 100644 --- a/scripts/imaging/visualization/visualization.py +++ b/scripts/imaging/visualization/visualization.py @@ -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: @@ -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) diff --git a/scripts/interferometer/jax_likelihood/rectangular.py b/scripts/interferometer/jax_likelihood/rectangular.py index f37ac8b..06f5e68 100644 --- a/scripts/interferometer/jax_likelihood/rectangular.py +++ b/scripts/interferometer/jax_likelihood/rectangular.py @@ -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: @@ -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) diff --git a/scripts/interferometer/jax_likelihood/rectangular_mge.py b/scripts/interferometer/jax_likelihood/rectangular_mge.py index 7d2d1b7..ed20449 100644 --- a/scripts/interferometer/jax_likelihood/rectangular_mge.py +++ b/scripts/interferometer/jax_likelihood/rectangular_mge.py @@ -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 @@ -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) diff --git a/scripts/misc/aggregator/config/priors/mesh/rectangular_bilinear_adapt_density.yaml b/scripts/misc/aggregator/config/priors/mesh/rectangular_bilinear_adapt_density.yaml new file mode 100755 index 0000000..0c38928 --- /dev/null +++ b/scripts/misc/aggregator/config/priors/mesh/rectangular_bilinear_adapt_density.yaml @@ -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 \ No newline at end of file diff --git a/scripts/misc/aggregator/config/priors/mesh/rectangular_bilinear_adapt_image.yaml b/scripts/misc/aggregator/config/priors/mesh/rectangular_bilinear_adapt_image.yaml new file mode 100755 index 0000000..71f10be --- /dev/null +++ b/scripts/misc/aggregator/config/priors/mesh/rectangular_bilinear_adapt_image.yaml @@ -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 \ No newline at end of file diff --git a/scripts/misc/aggregator/config/priors/mesh/rectangular_adapt_density.yaml b/scripts/misc/aggregator/config/priors/mesh/rectangular_rtu_adapt_density.yaml old mode 100755 new mode 100644 similarity index 88% rename from scripts/misc/aggregator/config/priors/mesh/rectangular_adapt_density.yaml rename to scripts/misc/aggregator/config/priors/mesh/rectangular_rtu_adapt_density.yaml index e78308a..47231a0 --- a/scripts/misc/aggregator/config/priors/mesh/rectangular_adapt_density.yaml +++ b/scripts/misc/aggregator/config/priors/mesh/rectangular_rtu_adapt_density.yaml @@ -1,4 +1,4 @@ -RectangularAdaptDensity: +RectangularRTUAdaptDensity: shape_0: type: Uniform lower_limit: 20.0 diff --git a/scripts/misc/aggregator/config/priors/mesh/rectangular_adapt_image.yaml b/scripts/misc/aggregator/config/priors/mesh/rectangular_rtu_adapt_image.yaml old mode 100755 new mode 100644 similarity index 91% rename from scripts/misc/aggregator/config/priors/mesh/rectangular_adapt_image.yaml rename to scripts/misc/aggregator/config/priors/mesh/rectangular_rtu_adapt_image.yaml index e8878be..1f3dd0d --- a/scripts/misc/aggregator/config/priors/mesh/rectangular_adapt_image.yaml +++ b/scripts/misc/aggregator/config/priors/mesh/rectangular_rtu_adapt_image.yaml @@ -1,4 +1,4 @@ -RectangularAdaptImage: +RectangularRTUAdaptImage: shape_0: type: Uniform lower_limit: 20.0 diff --git a/scripts/multi_dataset/jax_likelihood/rectangular.py b/scripts/multi_dataset/jax_likelihood/rectangular.py index 5ae0968..fb692b7 100644 --- a/scripts/multi_dataset/jax_likelihood/rectangular.py +++ b/scripts/multi_dataset/jax_likelihood/rectangular.py @@ -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 @@ -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, ) diff --git a/scripts/multi_dataset/jax_likelihood/rectangular_mge.py b/scripts/multi_dataset/jax_likelihood/rectangular_mge.py index 662c076..fc75956 100644 --- a/scripts/multi_dataset/jax_likelihood/rectangular_mge.py +++ b/scripts/multi_dataset/jax_likelihood/rectangular_mge.py @@ -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, )