Description Usage Arguments Details Functions Examples
2-D Non-equispaced Fourier Tranform
1 2 3 4 5 6 7 | nfft_2d(x, f_hat)
ndft_2d(x, f_hat)
nfft_adjoint_2d(x, f, n0, n1)
ndft_adjoint_2d(x, f, n0, n1)
|
x |
two dimensional complex vector in [-0.5,0.5)^2 |
f_hat |
set of frequencies |
f |
frequencies for adjoint, same length as |
n0 |
number of frequencies in the first dimension for transform, specified for adjoint. |
n1 |
number of frequencies in the second dimension for transform, specified for adjoint. |
The non-equispaced Fourier transform takes non-uniform samples x from the $d$-dimensional torus [0.5,0.5)^d.
The NDFT functions compute the Fourier transform directly. This is slow.
The NFFT functions use the FFT to compute this, which should be faster.
The adjoint, in this case, is not the same as the inverse. Solving the
inverse problem requires approximations. Here we present the 2D NDFT,
NFFT, and their adjoints. You most likely want to use the nfft_2d
and nfft_adjoint_2d
functions rather than the dft
functions.
ndft_2d
:
nfft_adjoint_2d
:
ndft_adjoint_2d
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | set.seed(20190728)
x <- matrix(runif(2*32*14)-.5, ncol=2, byrow = TRUE)
f_hat = 1:(32*14)
for(i in 1:(32*14)) f_hat[i] = runif(1)*1i + runif(1)
f_hatmatrix = matrix(f_hat, nrow = 32)
f_vector <- nfft_2d(x, f_hatmatrix)
fd_vector <- ndft_2d(x, f_hatmatrix)
f_vector[1:3]
fd_vector[1:3]
newf_hat <- nfft_adjoint_2d(x,f_vector,32,14)
newf_hat[1,1:7]
newdf_hat <- ndft_adjoint_2d(x,f_vector,32,14)
newdf_hat[1,1:7]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.