File Exchange

## ffts(X,V,Xq,method,​window)

version 1.4 (8.84 KB) by

Fast Fourier Transform ( FFT ) of scattered data

Updated

ffts, Performs the fast Fourier transform (FFT) on scatter data.

Yq = ffts(X,V,Xq)

or

Yq = ffts(X,V,Xq, method, window)

inputs,
X : Array with positions [m x 1]
V : Array with values [m x 1]
Xq : Node locations [ n x 1], with equally spaced points (see linspace)
(optional)
method : 1. 'grid', gridding (Default)
2. 'fit' , b-spline fit
window : 1. 'bspline', bspline (default)
2. 'kaiser', kaiser Bessel function

outputs,
Fq : The Fourier spectrum of the scatter data [ n x 1].

Gridding:
1. The scattered values (V) at positions (X) are smoothed ( convolution )
by a kernel to a regular grid. With the grid a 2 times oversampled
version of Xq
2. The data is multiplied with a set of density compensation weights.
Calculate as in step 1, but instead all values are set to 1. The
density compensation is 1 divided by this result.
3. The values on the regular grid are converted to the fourier
domain using a FFT.
4. Trim field of view, to size of Xq. This compensates the oversampling
of step 2. The sidelobes due to finite window size are now
clipped off.
5. The fourier domain is multipled by an apodization correction
function. Which is the 1/Fourier Transform of the kernel of step 1
to remove the effect of the kernel.

B-spline fit:
1. B-splines sampled on a regular grid are fitted to the values (V) at
positions (X), so they least squares approximate the data.
2. At the regular grid (Xq), values are interpolated using the fitted
B-splines
3. The FFT is done on the b-spline interpolated points

Marc

### Marc (view profile)

Awesome function.