building a better non uniform fast fourier transform
play

Building a better non-uniform fast Fourier transform ICERM 3/12/18 - PowerPoint PPT Presentation

Building a better non-uniform fast Fourier transform ICERM 3/12/18 Alex Barnett (Center for Computational Biology, Flatiron Institute) This work is collaboration with Jeremy Magland. We benefited from much discussions and/or codes, including:


  1. Building a better non-uniform fast Fourier transform ICERM 3/12/18 Alex Barnett (Center for Computational Biology, Flatiron Institute) This work is collaboration with Jeremy Magland. We benefited from much discussions and/or codes, including: Leslie Greengard, Ludvig af Klinteberg, Zydrunas Gimbutas, Marina Spivak, Joakim And´ en, and David Stein

  2. Overview We are releasing https://github.com/ahbarnett/finufft

  3. Overview We are releasing https://github.com/ahbarnett/finufft What does it do?

  4. Overview We are releasing https://github.com/ahbarnett/finufft What does it do? “Fourier analysis of non-uniformly spaced data at close to FFT speeds” But. . . there already exist libraries? eg NFFT from Chemnitz (Potts–Keiner–Kunis) , NUFFT from NYU (Lee–Greengard) Ours is faster in large-scale 2D and 3D settings & simpler to use

  5. Overview We are releasing https://github.com/ahbarnett/finufft What does it do? “Fourier analysis of non-uniformly spaced data at close to FFT speeds” But. . . there already exist libraries? eg NFFT from Chemnitz (Potts–Keiner–Kunis) , NUFFT from NYU (Lee–Greengard) Ours is faster in large-scale 2D and 3D settings & simpler to use Goals: show some math and engineering behind why, give applications. . .

  6. . . . and explain how “Tex” Logan—one of the best bluegrass fiddle players in the country—is key to the story:

  7. Recap the discrete Fourier transform (DFT) N − 1 e ik 2 πj � N c j , f k = − N/ 2 ≤ k < N/ 2 Task: eval. FFT is O ( N log N ) j =0

  8. Recap the discrete Fourier transform (DFT) N − 1 e ik 2 πj � N c j , f k = − N/ 2 ≤ k < N/ 2 Task: eval. FFT is O ( N log N ) j =0 Uses: 1) Discrete convolution: eg, filtering, PDE solve, regular-sampled data

  9. Recap the discrete Fourier transform (DFT) N − 1 e ik 2 πj � N c j , f k = − N/ 2 ≤ k < N/ 2 Task: eval. FFT is O ( N log N ) j =0 Uses: 1) Discrete convolution: eg, filtering, PDE solve, regular-sampled data 2) Given uniform (U) samples of a smooth 2 π -periodic func f , estimate its Fourier series coeffs ˆ n ∈ Z ˆ f n e − inx f ( x ) = � f n , ie so

  10. Recap the discrete Fourier transform (DFT) N − 1 e ik 2 πj � N c j , f k = − N/ 2 ≤ k < N/ 2 Task: eval. FFT is O ( N log N ) j =0 Uses: 1) Discrete convolution: eg, filtering, PDE solve, regular-sampled data 2) Given uniform (U) samples of a smooth 2 π -periodic func f , estimate its Fourier series coeffs ˆ n ∈ Z ˆ f n e − inx f ( x ) = � f n , ie so � 2 πj Vector c of samples, c j = 1 � N f N f k = · · · + ˆ f k − N + ˆ f k + ˆ f k + N + ˆ f k +2 N + · · · Easy to show its DFT is = ˆ m � =0 ˆ f k desired + � f k + mN aliasing error due to discrete sampling

  11. Recap the discrete Fourier transform (DFT) N − 1 e ik 2 πj � N c j , f k = − N/ 2 ≤ k < N/ 2 Task: eval. FFT is O ( N log N ) j =0 Uses: 1) Discrete convolution: eg, filtering, PDE solve, regular-sampled data 2) Given uniform (U) samples of a smooth 2 π -periodic func f , estimate its Fourier series coeffs ˆ n ∈ Z ˆ f n e − inx f ( x ) = � f n , ie so � 2 πj Vector c of samples, c j = 1 � N f N f k = · · · + ˆ f k − N + ˆ f k + ˆ f k + N + ˆ f k +2 N + · · · Easy to show its DFT is = ˆ m � =0 ˆ f k desired + � f k + mN aliasing error due to discrete sampling ˆ f smooth ⇔ f n decays for | n | large ⇔ aliasing error small Key: ˆ eg ( d/dx ) p f bounded ⇒ f n = O (1 / | n | p ) p -th order convergence of error vs N

  12. Recap the discrete Fourier transform (DFT) N − 1 e ik 2 πj � N c j , f k = − N/ 2 ≤ k < N/ 2 Task: eval. FFT is O ( N log N ) j =0 Uses: 1) Discrete convolution: eg, filtering, PDE solve, regular-sampled data 2) Given uniform (U) samples of a smooth 2 π -periodic func f , estimate its Fourier series coeffs ˆ n ∈ Z ˆ f n e − inx f ( x ) = � f n , ie so � 2 πj Vector c of samples, c j = 1 � N f N f k = · · · + ˆ f k − N + ˆ f k + ˆ f k + N + ˆ f k +2 N + · · · Easy to show its DFT is = ˆ m � =0 ˆ f k desired + � f k + mN aliasing error due to discrete sampling ˆ f smooth ⇔ f n decays for | n | large ⇔ aliasing error small Key: ˆ eg ( d/dx ) p f bounded ⇒ f n = O (1 / | n | p ) p -th order convergence of error vs N 3) Estimate power spectrum of non-periodic signal on U grid must first multiply by a “good” window function

  13. Contrast: what does NUFFT compute? { x j } M j =1 NU (non-uniform) points in [0 , 2 π ) Inputs: { c j } M N number of modes j =1 complex strengths, Three flavors of task: M � e ikx j c j , f k = − N/ 2 ≤ k < N/ 2 Type-1: NU to U, evaluates j =1 Generalizes the DFT (was case x j = 2 πj/N ) F series coeffs of sum of point masses.

  14. Contrast: what does NUFFT compute? { x j } M j =1 NU (non-uniform) points in [0 , 2 π ) Inputs: { c j } M N number of modes j =1 complex strengths, Three flavors of task: M � e ikx j c j , f k = − N/ 2 ≤ k < N/ 2 Type-1: NU to U, evaluates j =1 Generalizes the DFT (was case x j = 2 πj/N ) F series coeffs of sum of point masses. � e ikx j f k , Type-2: U to NU, evaluates c j = j = 1 , . . . , M − N/ 2 ≤ k<N/ 2 Evaluate usual F series at arbitrary targets. Is adjoint (but not inverse!) of type-1

  15. Contrast: what does NUFFT compute? { x j } M j =1 NU (non-uniform) points in [0 , 2 π ) Inputs: { c j } M N number of modes j =1 complex strengths, Three flavors of task: M � e ikx j c j , f k = − N/ 2 ≤ k < N/ 2 Type-1: NU to U, evaluates j =1 Generalizes the DFT (was case x j = 2 πj/N ) F series coeffs of sum of point masses. � e ikx j f k , Type-2: U to NU, evaluates c j = j = 1 , . . . , M − N/ 2 ≤ k<N/ 2 Evaluate usual F series at arbitrary targets. Is adjoint (but not inverse!) of type-1 Type-3: NU to NU, also needs NU output freqs { s k } N k =1 M � e is k x j c j , evaluates f k = k = 1 , . . . , N general exponential sum j =1 • For dimension d = 2 , 3 (etc), replace kx j by k · x j = k 1 x j + k 2 y j , etc

  16. These tasks crop up a lot • Magnetic resonance imaging (MRI). f is unknown 2D image; seek its vector of values f on a U grid Given data y j = ˆ f ( k j ) at NU set of Fourier pts k j : spiral imaging PROPELLER y = A f , is a 2D type-2 NUFFT. Evaluating the forward model, ie eval. Reconstruct f by iteratively solving this (rect, ill-cond) linear system (eg Fessler) Even computing a good preconditioner for this lin. sys. needs the NUFFT (Greengard–Inati ’06)

  17. • Cryo electron microscopy (EM) algorithms (how we got into this) We need to go between U voxel grid and NU spherical 3D k -space reps.

  18. • Cryo electron microscopy (EM) algorithms (how we got into this) We need to go between U voxel grid and NU spherical 3D k -space reps. This is an example of. . . • computing actual Fourier transforms of non-smooth f ( x ) accurately: f(x) FT f(k) x k x 1 x N NU quadrature nodes � ∞ Apply a good quadrature rule (eg Gauss) to the Fourier integral ˆ e ikx f ( x ) dx f ( k ) := −∞

  19. • Cryo electron microscopy (EM) algorithms (how we got into this) We need to go between U voxel grid and NU spherical 3D k -space reps. This is an example of. . . • computing actual Fourier transforms of non-smooth f ( x ) accurately: f(x) FT f(k) x k x 1 x N NU quadrature nodes � ∞ Apply a good quadrature rule (eg Gauss) to the Fourier integral ˆ e ikx f ( x ) dx f ( k ) := −∞ • Coherent diffraction imaging again given Fourier data on NU pts (Ewald spheres) • PDEs: interpolation from U to NU coords grids, applying heat kernels • Making PDEs, mol. dyn, spatially periodic (“particle-mesh Ewald”) • Given large # of point masses (eg stars), what is Fourier spectrum?

  20. A super-crude 1D type-1 NUFFT: “snap to fine grid” Three steps: Set up fine grid on [0 , 2 π ) , spacing h = 2 π/N f , N f > N

  21. A super-crude 1D type-1 NUFFT: “snap to fine grid” Three steps: Set up fine grid on [0 , 2 π ) , spacing h = 2 π/N f , N f > N a) Add each strength c j onto fine-grid cell w/ location ˜ x j nearest x j .

  22. A super-crude 1D type-1 NUFFT: “snap to fine grid” Three steps: Set up fine grid on [0 , 2 π ) , spacing h = 2 π/N f , N f > N a) Add each strength c j onto fine-grid cell w/ location ˜ x j nearest x j . b) Call this vector { b l } N f − 1 b k } N f / 2 − 1 : take its size- N f FFT to get { ˆ k = − N f / 2 . l =0

  23. A super-crude 1D type-1 NUFFT: “snap to fine grid” Three steps: Set up fine grid on [0 , 2 π ) , spacing h = 2 π/N f , N f > N a) Add each strength c j onto fine-grid cell w/ location ˜ x j nearest x j . b) Call this vector { b l } N f − 1 b k } N f / 2 − 1 : take its size- N f FFT to get { ˆ k = − N f / 2 . l =0 c) Keep just low-freq outputs: ˜ f k = ˆ b k , for − N/ 2 ≤ k < N/ 2

Recommend


More recommend