nfft_2d: 2-D NFFT

Description Usage Arguments Details Functions Examples

View source: R/NFFT2d.R

Description

2-D Non-equispaced Fourier Tranform

Usage

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)

Arguments

x

two dimensional complex vector in [-0.5,0.5)^2

f_hat

set of frequencies

f

frequencies for adjoint, same length as x

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.

Details

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.

Functions

Examples

 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]

gzt/rNFFT documentation built on April 15, 2020, 6:07 p.m.