Commit 24863a2
docs(transformer): state the real use_adjoint_scaling contract
`TransformerDFT.image_from` described `use_adjoint_scaling` as "Currently
unused" and `TransformerNUFFT.image_from` as "accepted for API compatibility
and otherwise unused". Read together those invite deleting the parameter and
the `use_adjoint_scaling=True` at `Interferometer.apply_sparse_operator` —
which would silently break the pynufft fallback by a factor of `4*N_y*N_x`.
Measured against the DFT adjoint on random visibilities:
shape legacy raw vs DFT legacy scaled vs DFT
(16,16) 9.99e-01 2.61e-02
(32,32) 1.00e+00 4.23e-03
The parameter's contract is "normalise this transformer's adjoint onto the
common scale" — a no-op for DFT and the nufftax-backed `TransformerNUFFT`
(both already the plain mathematical adjoint), load-bearing for
`TransformerNUFFTPyNUFFT`, whose pynufft-internal IFFT normalisation leaves
its raw adjoint that factor low. Documented as such, with a do-not-remove note.
Docstrings only; no behaviour change. Found while closing #326.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 616e8b4 commit 24863a2
1 file changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
| |||
734 | 741 | | |
735 | 742 | | |
736 | 743 | | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
742 | 753 | | |
743 | 754 | | |
744 | 755 | | |
| |||
0 commit comments