Skip to content

Commit 3913c68

Browse files
committed
feat: rectangular mesh split follow-up — RTU/Bilinear prior configs + docs
Downstream of PyAutoArray#462 (rectangular Bilinear/RTU mesh split, task PyAutoArray#461): - Packaged prior defaults: config/priors/mesh/rectangular_adapt_*.yaml -> rectangular_rtu_adapt_*.yaml plus new rectangular_bilinear_adapt_*.yaml (same priors — the Bilinear meshes have no kernel hyperparameters). - docs/api/pixelization.rst lists all four adaptive rectangular classes. - exc.py docstring updated to the RTU name. - test config pixelizations.json keys: the stale "rectangular.<Class>" module-prefixed keys never resolved (autonerves matches on the real module path via endswith); rekeyed to rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity and rectangular_rtu_adapt_density.RectangularRTUAdaptDensity. Full test suite: 1102 passed against merged PyAutoArray main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WtMqU3JfmyJh8GvB7jT4Et
1 parent b03d826 commit 3913c68

8 files changed

Lines changed: 104 additions & 16 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
RectangularBilinearAdaptDensity:
2+
shape_0:
3+
type: Uniform
4+
lower_limit: 20.0
5+
upper_limit: 45.0
6+
width_modifier:
7+
type: Absolute
8+
value: 8.0
9+
limits:
10+
lower: 3.0
11+
upper: inf
12+
shape_1:
13+
type: Uniform
14+
lower_limit: 20.0
15+
upper_limit: 45.0
16+
width_modifier:
17+
type: Absolute
18+
value: 8.0
19+
limits:
20+
lower: 3.0
21+
upper: inf
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
RectangularBilinearAdaptImage:
2+
shape_0:
3+
type: Uniform
4+
lower_limit: 20.0
5+
upper_limit: 45.0
6+
width_modifier:
7+
type: Absolute
8+
value: 8.0
9+
limits:
10+
lower: 3.0
11+
upper: inf
12+
shape_1:
13+
type: Uniform
14+
lower_limit: 20.0
15+
upper_limit: 45.0
16+
width_modifier:
17+
type: Absolute
18+
value: 8.0
19+
limits:
20+
lower: 3.0
21+
upper: inf
22+
weight_power:
23+
type : Uniform
24+
lower_limit: 0.0
25+
upper_limit: 10.0
26+
width_modifier:
27+
type: Absolute
28+
value: 2.0
29+
limits:
30+
lower: -100.0
31+
upper: 100.0
32+
weight_floor:
33+
type: LogUniform
34+
lower_limit: 0.00001
35+
upper_limit: 1.0
36+
width_modifier:
37+
type: Absolute
38+
limits:
39+
lower: 0.0
40+
upper: inf

autogalaxy/config/priors/mesh/rectangular_adapt_density.yaml renamed to autogalaxy/config/priors/mesh/rectangular_rtu_adapt_density.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RectangularAdaptDensity:
1+
RectangularRTUAdaptDensity:
22
shape_0:
33
type: Uniform
44
lower_limit: 20.0

autogalaxy/config/priors/mesh/rectangular_adapt_image.yaml renamed to autogalaxy/config/priors/mesh/rectangular_rtu_adapt_image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RectangularAdaptImage:
1+
RectangularRTUAdaptImage:
22
shape_0:
33
type: Uniform
44
lower_limit: 20.0

autogalaxy/exc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class PixelizationException(af.exc.FitException):
5151
"""
5252
Raises exceptions associated with the `inversion/pixelization` modules and `Pixelization` classes.
5353
54-
For example if a `RectangularAdaptDensity` mesh has dimensions below 3x3.
54+
For example if a `RectangularRTUAdaptDensity` mesh has dimensions below 3x3.
5555
5656
This exception overwrites `autoarray.exc.PixelizationException` in order to add a `FitException`. This means that
5757
if this exception is raised during a model-fit in the analysis class's `log_likelihood_function` that model

docs/api/pixelization.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ Mesh [ag.mesh]
4949
:template: custom-class-template.rst
5050
:recursive:
5151

52-
RectangularAdaptDensity
52+
RectangularBilinearAdaptDensity
53+
RectangularBilinearAdaptImage
54+
RectangularRTUAdaptDensity
55+
RectangularRTUAdaptImage
5356
Delaunay
5457

5558
Regularization [ag.reg]
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
2-
"rectangular.RectangularAdaptDensity": {
2+
"Voronoi": {
3+
"pixels": {
4+
"type": "Uniform",
5+
"lower_limit": 0.0,
6+
"upper_limit": 1.0
7+
}
8+
},
9+
"rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity": {
310
"shape_0": {
411
"type": "Uniform",
512
"lower_limit": 10.0,
@@ -11,11 +18,16 @@
1118
"upper_limit": 30.0
1219
}
1320
},
14-
"Voronoi": {
15-
"pixels": {
21+
"rectangular_rtu_adapt_density.RectangularRTUAdaptDensity": {
22+
"shape_0": {
1623
"type": "Uniform",
17-
"lower_limit": 0.0,
18-
"upper_limit": 1.0
24+
"lower_limit": 10.0,
25+
"upper_limit": 30.0
26+
},
27+
"shape_1": {
28+
"type": "Uniform",
29+
"lower_limit": 10.0,
30+
"upper_limit": 30.0
1931
}
2032
}
21-
}
33+
}
Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
2-
"rectangular.RectangularAdaptDensity": {
2+
"Voronoi": {
3+
"pixels": {
4+
"type": "Uniform",
5+
"lower_limit": 0.0,
6+
"upper_limit": 1.0
7+
}
8+
},
9+
"rectangular_bilinear_adapt_density.RectangularBilinearAdaptDensity": {
310
"shape_0": {
411
"type": "Uniform",
512
"lower_limit": 10.0,
@@ -11,11 +18,16 @@
1118
"upper_limit": 30.0
1219
}
1320
},
14-
"Voronoi": {
15-
"pixels": {
21+
"rectangular_rtu_adapt_density.RectangularRTUAdaptDensity": {
22+
"shape_0": {
1623
"type": "Uniform",
17-
"lower_limit": 0.0,
18-
"upper_limit": 1.0
24+
"lower_limit": 10.0,
25+
"upper_limit": 30.0
26+
},
27+
"shape_1": {
28+
"type": "Uniform",
29+
"lower_limit": 10.0,
30+
"upper_limit": 30.0
1931
}
2032
}
21-
}
33+
}

0 commit comments

Comments
 (0)