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
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
RectangularAdaptDensity:
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
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
@@ -1,40 +1,40 @@
RectangularAdaptImage:
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
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
21 changes: 21 additions & 0 deletions config/priors/mesh/rectangular_rtu_adapt_density.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RectangularRTUAdaptDensity:
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_rtu_adapt_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
RectangularRTUAdaptImage:
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
16 changes: 8 additions & 8 deletions notebooks/chapter_3_pixelizations/tutorial_1_pixelizations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"There are multiple `Mesh`'s available in **PyAutoGalaxy**. For now, we'll keep it simple and use a rectangular\n",
"grid, whose `shape` defines its $(y,x)$ dimensions. We will make it the same shape as the 2D grid.\n",
"\n",
"The `RectangularAdaptDensity` mesh adapts its pixels to the density of the masked image-plane\n",
"The `RectangularBilinearAdaptDensity` mesh adapts its pixels to the density of the masked image-plane\n",
"grid via the ray-guided transformed uniform (RTU) grid formulation of Enzi et al. (2026)\n",
"(https://arxiv.org/abs/2606.30620), which should be cited in published work using this mesh.\n",
"Note that whereas that paper pairs the RTU grid with a Gaussian-process prior, **PyAutoGalaxy**\n",
Expand All @@ -113,7 +113,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"mesh = ag.mesh.RectangularAdaptDensity(shape=(100, 100))"
"mesh = ag.mesh.RectangularBilinearAdaptDensity(shape=(100, 100))"
],
"outputs": [],
"execution_count": null
Expand Down Expand Up @@ -186,7 +186,7 @@
"metadata": {},
"source": [
"plot_mapper(\n",
" mapper=mapper, title=\"Fairly Boring Grid2D of RectangularAdaptDensity Pixels\"\n",
" mapper=mapper, title=\"Fairly Boring Grid2D of RectangularBilinearAdaptDensity Pixels\"\n",
")"
],
"outputs": [],
Expand All @@ -204,11 +204,11 @@
"cell_type": "code",
"metadata": {},
"source": [
"print(\"RectangularAdaptDensity Grid2D Pixel Centre 1:\")\n",
"print(\"RectangularBilinearAdaptDensity Grid2D Pixel Centre 1:\")\n",
"print(mapper.source_plane_mesh_grid[0])\n",
"print(\"RectangularAdaptDensity Grid2D Pixel Centre 2:\")\n",
"print(\"RectangularBilinearAdaptDensity Grid2D Pixel Centre 2:\")\n",
"print(mapper.source_plane_mesh_grid[1])\n",
"print(\"RectangularAdaptDensity Grid2D Pixel Centre 3:\")\n",
"print(\"RectangularBilinearAdaptDensity Grid2D Pixel Centre 3:\")\n",
"print(mapper.source_plane_mesh_grid[2])\n",
"print(\"etc.\")"
],
Expand Down Expand Up @@ -271,13 +271,13 @@
"plot_mapper(\n",
" mapper=mapper,\n",
" mesh_grid=mapper.source_plane_data_grid,\n",
" title=\"Even less Boring Grid2D of RectangularAdaptDensity Pixels\",\n",
" title=\"Even less Boring Grid2D of RectangularBilinearAdaptDensity Pixels\",\n",
")\n",
"\n",
"plot_mapper(\n",
" mapper=mapper,\n",
" mesh_grid=mapper.source_plane_data_grid,\n",
" title=\"Zoomed Grid2D of RectangularAdaptDensity Pixels\",\n",
" title=\"Zoomed Grid2D of RectangularBilinearAdaptDensity Pixels\",\n",
")"
],
"outputs": [],
Expand Down
2 changes: 1 addition & 1 deletion notebooks/chapter_3_pixelizations/tutorial_2_mappers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"mesh = ag.mesh.RectangularAdaptDensity(\n",
"mesh = ag.mesh.RectangularBilinearAdaptDensity(\n",
" shape=(dataset.shape_native[0] / 2, dataset.shape_native[1] / 2)\n",
")\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions notebooks/chapter_3_pixelizations/tutorial_3_inversions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"mesh = ag.mesh.RectangularAdaptDensity(shape=(25, 25))\n",
"mesh = ag.mesh.RectangularBilinearAdaptDensity(shape=(25, 25))\n",
"\n",
"pixelization = ag.Pixelization(mesh=mesh)\n",
"\n",
Expand Down Expand Up @@ -332,7 +332,7 @@
"metadata": {},
"source": [
"pixelization = ag.Pixelization(\n",
" mesh=ag.mesh.RectangularAdaptDensity(shape=(25, 25)),\n",
" mesh=ag.mesh.RectangularBilinearAdaptDensity(shape=(25, 25)),\n",
" regularization=ag.reg.Constant(coefficient=1.0),\n",
")\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"metadata": {},
"source": [
"pixelization = ag.Pixelization(\n",
" mesh=ag.mesh.RectangularAdaptDensity(shape=(50, 50)),\n",
" mesh=ag.mesh.RectangularBilinearAdaptDensity(shape=(50, 50)),\n",
" regularization=ag.reg.Constant(coefficient=1.0),\n",
")\n",
"\n",
Expand Down Expand Up @@ -213,7 +213,7 @@
"metadata": {},
"source": [
"pixelization = ag.Pixelization(\n",
" mesh=ag.mesh.RectangularAdaptDensity(shape=(50, 50)),\n",
" mesh=ag.mesh.RectangularBilinearAdaptDensity(shape=(50, 50)),\n",
" regularization=ag.reg.Constant(coefficient=0.01),\n",
")\n",
"\n",
Expand Down Expand Up @@ -260,7 +260,7 @@
"metadata": {},
"source": [
"pixelization = ag.Pixelization(\n",
" mesh=ag.mesh.RectangularAdaptDensity(shape=(50, 50)),\n",
" mesh=ag.mesh.RectangularBilinearAdaptDensity(shape=(50, 50)),\n",
" regularization=ag.reg.Constant(coefficient=100.0),\n",
")\n",
"\n",
Expand Down Expand Up @@ -382,7 +382,7 @@
"metadata": {},
"source": [
"pixelization = ag.Pixelization(\n",
" mesh=ag.mesh.RectangularAdaptDensity(shape=(50, 50)),\n",
" mesh=ag.mesh.RectangularBilinearAdaptDensity(shape=(50, 50)),\n",
" regularization=ag.reg.Constant(coefficient=1.0),\n",
")\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"to 20 x 20 = 400 mesh pixels.\n",
"\n",
"We use the `RectangularUniform` mesh, where all rectangular mesh pixels have the same size, rather than the\n",
"`RectangularAdaptDensity` mesh used in the previous tutorials. The uniform mesh keeps the geometry simple, and every\n",
"`RectangularBilinearAdaptDensity` mesh used in the previous tutorials. The uniform mesh keeps the geometry simple, and every\n",
"equation below applies unchanged to the adaptive meshes -- only the mesh pixel centres move.\n",
"\n",
"By default, mesh pixels at the edge of the mesh are forced to solutions of zero flux by the linear algebra solver.\n",
Expand Down Expand Up @@ -326,7 +326,7 @@
"cell_type": "code",
"metadata": {},
"source": [
"from autoarray.inversion.mesh.mesh.rectangular_adapt_density import overlay_grid_from\n",
"from autoarray.inversion.mesh.mesh.rectangular_rtu_adapt_density import overlay_grid_from\n",
"\n",
"mesh_grid = overlay_grid_from(\n",
" shape_native=mesh_shape, grid=masked_dataset.grids.pixelization\n",
Expand Down
8 changes: 4 additions & 4 deletions notebooks/chapter_3_pixelizations/tutorial_6_model_fit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"\n",
" - The galaxy's disk is an `Exponential` [0 parameters: parameters fixed from search 1].\n",
"\n",
" - Residual galaxy structure is reconstructed using a `RectangularAdaptDensity` mesh with a fixed 28 x 28\n",
" - Residual galaxy structure is reconstructed using a `RectangularBilinearAdaptDensity` mesh with a fixed 28 x 28\n",
" shape [0 parameters].\n",
"\n",
" - This pixelization is regularized using a `GaussianKernel` scheme [2 parameters].\n",
Expand All @@ -260,7 +260,7 @@
"source": [
"pixelization = af.Model(\n",
" ag.Pixelization,\n",
" mesh=ag.mesh.RectangularAdaptDensity(shape=mesh_shape),\n",
" mesh=ag.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n",
" regularization=ag.reg.GaussianKernel,\n",
")\n",
"\n",
Expand Down Expand Up @@ -305,7 +305,7 @@
"\n",
" - The galaxy's disk is an `Sersic` [7 parameters: priors initialized from search 1].\n",
"\n",
" - Residual galaxy structure uses a `RectangularAdaptDensity` mesh with a fixed 28 x 28 shape [0 parameters].\n",
" - Residual galaxy structure uses a `RectangularBilinearAdaptDensity` mesh with a fixed 28 x 28 shape [0 parameters].\n",
"\n",
" - This pixelization is regularized using a `GaussianKernel` scheme [2 parameters].\n",
"\n",
Expand All @@ -332,7 +332,7 @@
"\n",
"pixelization = af.Model(\n",
" ag.Pixelization,\n",
" mesh=ag.mesh.RectangularAdaptDensity(shape=mesh_shape),\n",
" mesh=ag.mesh.RectangularBilinearAdaptDensity(shape=mesh_shape),\n",
" regularization=ag.reg.GaussianKernel,\n",
")\n",
"\n",
Expand Down
Loading
Loading