FastTransforms
Loading...
Searching...
No Matches
FFTW Synthesis and Analysis

FFTW Synthesis and Analysis.

\(\def\ud{{\rm\,d}} \def\ii{{\rm i}} \def\fl{{\rm\,fl}} \def\abs#1{\left|{#1}\right|} \def\norm#1{\left\|{#1}\right\|} \def\conj#1{\overline{#1}} \)

FastTransforms provides templates for FFTW synthesis and analysis on the sphere, disk, and triangle. Data structures within the ft_* namespace are provided, along with destructors. Convenience methods are provided to plan and execute the transforms at particular points.

FFTW Synthesis and Analysis

Function arguments

For every domain, the functions ft_plan_*_synthesis and ft_plan_*_analysis are pre-computations and the functions ft_execute_*_synthesis and ft_execute_*_analysis execute them. Synthesis converts coefficients to function values on the grid, and analysis converts function values on the grid to coefficients. The arguments are:

  • N and M are the numbers of points in the \(N\times M\) grids below, which are also the numbers of rows and columns of the array X. On the tetrahedron, there is a third dimension, L, and the array is \(N\times L\times M\).
  • rho is the inner radius of the annulus, \(0<\rho<1\).
  • S is the integer spin of the spin-weighted spherical harmonics.
  • flags are the FFTW planner flags, such as FFTW_ESTIMATE or FFTW_MEASURE. They are passed to FFTW without modification.
  • TRANS is a character that selects the operation: 'N' applies the synthesis or the analysis, and 'T' applies its transpose.
  • P is the plan that is returned by the corresponding pre-computation.
  • X is an \(N\times M\) array in column-major ordering that is overwritten by the result. For synthesis, it stores the coefficients \(G\) that are described in FastTransforms on entry, and the function values on exit. For analysis, it is the other way around. The function value at the grid point with indices \(n\) and \(m\) below is stored in X[n+N*m]. On the sphere with spin, X is an array of ft_complex.

ft_fftw_sphere_plan & ft_fftw_spinsphere_plan

On the sphere, the \(N\times M\) equiangular grids are:

\begin{align*}\theta_n & = \frac{2n+1}{2N}\pi,\quad {\rm for} \quad 0 \le n < N,\\ \varphi_m & = \frac{2m}{M}\pi,\quad {\rm for} \quad 0 \le m < M. \end{align*}

ft_fftw_disk_plan

On the disk, the \(N\times M\) radial–azimuthal grids are:

\begin{align*}r_n & = \cos\left(\frac{2n+1}{4N}\pi\right) = \sin\left(\frac{2N-2n-1}{4N}\pi\right),\quad {\rm for} \quad 0 \le n < N,\\ \theta_m & = \frac{2m}{M}\pi,\quad {\rm for} \quad 0 \le m < M. \end{align*}

ft_fftw_annulus_plan

On the annulus, the \(N\times M\) radial–azimuthal grids are:

\begin{align*}r_n & = \sqrt{\cos^2\left(\frac{2n+1}{4N}\pi\right) + \rho^2\sin^2\left(\frac{2n+1}{4N}\pi\right)},\\ & = \sqrt{\sin^2\left(\frac{2N-2n-1}{4N}\pi\right) + \rho^2\cos^2\left(\frac{2N-2n-1}{4N}\pi\right)},\quad {\rm for} \quad 0 \le n < N,\\ \theta_m & = \frac{2m}{M}\pi,\quad {\rm for} \quad 0 \le m < M. \end{align*}

ft_fftw_rectdisk_plan

On the rectangularized disk, the \(N\times M\) mapped tensor product grids are:

\begin{align*}x_n & = \cos\left(\frac{2n+1}{2N}\pi\right) = \sin\left(\frac{N-2n-1}{2N}\pi\right),\quad {\rm for} \quad 0 \le n < N,\\ z_m & = \cos\left(\frac{2m+1}{2M}\pi\right) = \sin\left(\frac{M-2m-1}{2M}\pi\right),\quad {\rm for} \quad 0 \le m < M,\\ y_{n,m} & = \sqrt{1-x_n^2}z_m. \end{align*}

Slightly more accuracy can be expected by using an auxiliary array:

\[w_n = \sin\left(\frac{2n+1}{2N}\pi\right),\quad {\rm for} \quad 0 \le n < N, \]

so that \(y_{n,m} = w_nz_m\).

ft_fftw_triangle_plan

On the reference triangle with vertices \((0,0)\), \((0,1)\), and \((1,0)\), the \(N\times M\) mapped tensor product grids are:

\begin{align*}x = \frac{1+u}{2}, & \quad {\rm and} \quad y = \frac{(1-u)(1+v)}{4},\quad{\rm where},\\ u_n & = \cos\left(\frac{2n+1}{2N}\pi\right),\quad {\rm for} \quad 0 \le n < N,\\ v_m & = \cos\left(\frac{2m+1}{2M}\pi\right),\quad {\rm for} \quad 0 \le m < M. \end{align*}

As in the radial grid on the disk, slightly more accuracy can be maintained from:

\begin{align*}x_n & = \left[\sin\left(\frac{2N-2n-1}{4N}\pi\right)\right]^2,\quad {\rm for} \quad 0 \le n < N,\\ w_m & = \left[\sin\left(\frac{2M-2m-1}{4M}\pi\right)\right]^2,\quad {\rm for} \quad 0 \le m < M,\\ y_{n,m} & = x_{N-1-n}w_m. \end{align*}