Commit f317c2e
Register FitInterferometer return value as a JAX pytree
Adds ``_register_fit_interferometer_pytrees`` to ``AnalysisInterferometer``,
mirroring the imaging-side ``_register_fit_imaging_pytrees``. Called at the
top of ``fit_from`` when ``use_jax=True`` so ``jax.jit(analysis.fit_from)``
can flatten the returned ``FitInterferometer``.
Registers:
- ``FitInterferometer`` with dataset / adapt_images / settings as aux
- ``Tracer`` with cosmology as aux (already covered by the imaging path
but harmless to re-register under the interferometer site)
- ``DatasetModel`` — always present on ``FitDataset`` subclasses even
when ``fit_from`` doesn't pass one explicitly (``FitDataset.__init__``
falls back to ``DatasetModel()``)
Unlocks the Path A PoC in
``autolens_workspace_test/scripts/jax_likelihood_functions/interferometer/mge_pytree.py``
for the MGE-source interferometer variant.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent f2d5cd6 commit f317c2e
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
190 | 214 | | |
191 | 215 | | |
192 | 216 | | |
| |||
0 commit comments