flatironinstitute / finufft

Non-uniform fast Fourier transform library of types 1,2,3 in dimensions 1,2,3
Other
286 stars 72 forks source link

Inverse NUFFT by finufft #173

Closed jzzhang001 closed 1 year ago

jzzhang001 commented 3 years ago

I am writing for your kind help on the inverse nufft (3d) method in python. Are there any possible packages for usage directly? As mentioned in the troubleshooting (https://finufft.readthedocs.io/en/latest/trouble.html?highlight=invert#mathematical-issues-and-advice) part, "In the tutorials we will add examples showing how to invert the NUFFT; ", while I didn't find it. Is it possible to provide some more details on that. Thanks a lot.

ahbarnett commented 3 years ago

Dear Stefan, Sorry, no inversion demos just yet. It is more of a research topic, application-dependent. For now I suggest you apply CG to the normal equations, possibly using the diagonal sinc-squared weight preconditioner from [GLI] The fast sinc transform and image reconstruction from nonuniform samples in kk-space. L. Greengard, J.-Y. Lee and S. Inati, Commun. Appl. Math. Comput. Sci (CAMCOS) 1(1) 121-131 (2006). If this doesn't make sense, try a simpler area-weighting from the MRI literature. What is your application? Best, Alex

On Mon, Jan 11, 2021 at 1:41 AM Stefan Zhang notifications@github.com wrote:

I am writing for your kind help on the inverse nufft (3d) method in python. Are there any possible packages for usage directly? As mentioned in the troubleshooting ( https://finufft.readthedocs.io/en/latest/trouble.html?highlight=invert#mathematical-issues-and-advice) part, "In the tutorials we will add examples showing how to invert the NUFFT; ", while I didn't find it. Thanks a lot.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/173, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSQ5X4JOIQRR24HEEF3SZKMR5ANCNFSM4V5DQZDQ .

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

ahbarnett commented 3 years ago

Also, NFFT has inverse as a direct call. But it is not as fast as we are, and I don't know if they have py interfaces...

On Mon, Jan 11, 2021 at 1:25 PM Alex Barnett abarnett@flatironinstitute.org wrote:

Dear Stefan, Sorry, no inversion demos just yet. It is more of a research topic, application-dependent. For now I suggest you apply CG to the normal equations, possibly using the diagonal sinc-squared weight preconditioner from [GLI] The fast sinc transform and image reconstruction from nonuniform samples in kk-space. L. Greengard, J.-Y. Lee and S. Inati, Commun. Appl. Math. Comput. Sci (CAMCOS) 1(1) 121-131 (2006). If this doesn't make sense, try a simpler area-weighting from the MRI literature. What is your application? Best, Alex

On Mon, Jan 11, 2021 at 1:41 AM Stefan Zhang notifications@github.com wrote:

I am writing for your kind help on the inverse nufft (3d) method in python. Are there any possible packages for usage directly? As mentioned in the troubleshooting ( https://finufft.readthedocs.io/en/latest/trouble.html?highlight=invert#mathematical-issues-and-advice) part, "In the tutorials we will add examples showing how to invert the NUFFT; ", while I didn't find it. Thanks a lot.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/173, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSQ5X4JOIQRR24HEEF3SZKMR5ANCNFSM4V5DQZDQ .

--

*---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

jzzhang001 commented 3 years ago

Dear Alex, Thanks for your reply. My application is rather straightforward. I have a set of cylindrical 3d grids. I want to do convolution on that, so I need to do a NUFFT by finufft first, and then an inversion after some multiplication. Best, Stefan

ahbarnett commented 3 years ago

Ah, that's good. Since your grid has a regular geometry, you can probably set up a good quadrature rule on it. This means a weight for each node, so that integrals are well-approximated. With that done, you don't need to invert. Simply use the 3d1 to approximate the Euler-Fourier formula for the Fourier coeffs, multiply by the Fourier coeffs of your convolution function, then use 3d2 to evaluate back at the original nodes. This is much faster than inverting. Some of my tutorials on the docs site shows examples of quadrature. Let me know if need help on that.

On Tue, Jan 12, 2021 at 12:47 AM Stefan Zhang notifications@github.com wrote:

Dear Alex, Thanks for your reply. My application is rather straightforward. I have a set of cylindrical 3d grids. I want to do convolution on that, so I need to do a NUFFT by finufft first, and then an inversion after some multiplication. Best, Stefan

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/173#issuecomment-758419985, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSRKCVVT7OH5MVHKU6LSZPO63ANCNFSM4V5DQZDQ .

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

jzzhang001 commented 3 years ago

Thanks a lot. Now I am trying as you suggested, and the results would be posted here later.

ahbarnett commented 3 years ago

see discussion in thread for issue #182. I hope to write a tutorial soon.