Skip to content

Conversation

@iancze
Copy link
Collaborator

@iancze iancze commented Jun 14, 2021

When complete, will close #17

Implementing "loose" visibility connector through the torchkbnufft package.

@iancze iancze self-assigned this Jun 14, 2021
@benjaminpope
Copy link

Out of curiosity - I just wanted to ask about your experience using the FINuFFT algorithm instead of an FFT.

In his habilitation thesis (in French - how's your French? It's really great), Frantz Martinache shows that if you want to go from the image to the uv plane, doing an FFT and resampling gives way worse model systematics than doing a matrix fourier transform (Figure 60 in that thesis).

I haven't used the NuFFT... how do we go here I wonder?

@iancze
Copy link
Collaborator Author

iancze commented Aug 3, 2022

I've heard great things about FINUFFT and would eventually like to use it. With the help of @dfm a while ago I think we had looked into how one might use it to calculate gradients (possibly in theano?), but I think he's probably solved those problems using his JAX bindings. I haven't seen PyTorch bindings, but if there were, I would go with that directly.

I'm not sure what kind of resampling is done in Frantz Martinache's thesis (my French is limited to bumbling about the patisserie!) but a naive resampling (e.g., bicubic) will indeed yield terrible results. When we've needed resampling (in this and in other packages) we've used the "convolutional regridding" with spheroidal wavefunction approach. This has a history from the VLA and I think is shown to be sufficiently accurate (and we've tested it, too). It works, but it's not the fastest. Do you know if "matrix Fourier transform" is the same thing that radio astronomers also call "direct Fourier transform," i.e., no "fast" involved?

After Alex Barnett (Flatiron) explained to me how FINUFFT works with Kaiser Bessel functions, I was persuaded that was probably a smarter and more efficient way to do things. In lieu of a PyTorch connection to FINUFFT, the Torchkbnufft package seems like a decent option.

I think the main thing needed to move this forward is just for me to claw away a few days to figure out the API to torchkbnufft and connect up the wires--tricky with the start of the semester coming up. But last I remember working on this it seemed plausible that it should all hang together. We do actually need this functionality for another project we're involved with, so it's high priority.

@benjaminpope
Copy link

Yeah I haven't used, but intend to try, jax-finufft for dLux but haven't got around to it yet.

Yeah in the Martinache work LDFT means local direct fourier transform, direct being with no 'fast' involved, as implemented in his xara package with compute_dftm1 and compute_dftm2.

@iancze iancze marked this pull request as ready for review December 25, 2022 01:00
@iancze iancze merged commit e31d454 into main Dec 25, 2022
@iancze iancze deleted the nufft branch December 25, 2022 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Loose" (Ungridded) Visibility DataConnector

3 participants