Commit f9aceea
committed
feat: split rectangular adaptive meshes — Bilinear (rank-CDF) vs RTU (kernel-CDF)
Split the rectangular adaptive mesh family into two user-facing variants
(PyAutoArray#461):
- RectangularBilinearAdaptDensity / RectangularBilinearAdaptImage: the
empirical rank-CDF lattice transform (sort + cumsum, no kernel
hyperparameters), recovered from the pre-#402 implementation
(22b2846^) as create_transforms_rank. O(N log N) on CPU — the fast
workspace default, eliminating the O(M_sub x N_data) erf sum that
dominates the numba CPU likelihood (55% euclid / 89% hst).
- RectangularRTUAdaptDensity / RectangularRTUAdaptImage: pure renames of
the kernel-CDF classes (values unchanged) — the advanced option for
GPU, JAX gradient samplers and the interferometer sparse path, where
they remain the only adaptive rectangular meshes with usable gradients.
- RectangularUniform unchanged (now inherits the RTU name).
The transform seam is a `transform="rank"|"kernel"` selector threaded
through create_transforms dispatch, the adaptive_rectangular_* functions,
InterpolatorRectangular and MeshGeometryRectangular, so the geometry's
areas/edges always route through the same transform as the mapper. Both
transforms share the existing 4-pixel bilinear interpolation.
Docstrings encode the guidance split: gradient inference on the Bilinear
default needs over_sample_size_pixelization >= 4 (imaging); interferometer
gradient work needs RTU (certified in the July gradient audit).
Breaking rename — no back-compat aliases; downstream workspaces update in
follow-up PRs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WtMqU3JfmyJh8GvB7jT4Et1 parent 90f6f0c commit f9aceea
22 files changed
Lines changed: 706 additions & 96 deletions
File tree
- autoarray
- inversion
- inversion
- linear_obj
- mesh
- interpolator
- mesh_geometry
- mesh
- util
- files
- test_autoarray/inversion/pixelization
- interpolator
- mappers
- mesh_geometry
- mesh
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
786 | 786 | | |
787 | 787 | | |
788 | 788 | | |
789 | | - | |
| 789 | + | |
790 | 790 | | |
791 | 791 | | |
792 | | - | |
| 792 | + | |
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| |||
0 commit comments