fft(A [, dims])
Performs a multidimensional FFT of the array
A. The optional
dims argument specifies an iterable subset of dimensions (e.g. an integer, range, tuple, or array) to transform along. Most efficient if the size of
A along the transformed dimensions is a product of small primes; see
Base.nextprod. See also
plan_fft() for even greater efficiency.
A one-dimensional FFT computes the one-dimensional discrete Fourier transform (DFT) as defined by
A multidimensional FFT simply performs this operation along each transformed dimension of
This performs a multidimensional FFT by default. FFT libraries in other languages such as Python and Octave perform a one-dimensional FFT along the first non-singleton dimension of the array. This is worth noting while performing comparisons.
fft!(A [, dims])
fft, but operates in-place on
A, which must be an array of complex floating-point numbers.
ifft(A [, dims])
Multidimensional inverse FFT.
A one-dimensional inverse FFT computes
A multidimensional inverse FFT simply performs this operation along each transformed dimension of
ifft!(A [, dims])
ifft, but operates in-place on
bfft(A [, dims])
ifft, but computes an unnormalized inverse (backward) transform, which must be divided by the product of the sizes of the transformed dimensions in order to obtain the inverse. (This is slightly more efficient than
ifft because it omits a scaling step, which in some applications can be combined with other computational steps elsewhere.)
bfft!(A [, dims])
bfft, but operates in-place on
plan_fft(A [, dims]; flags=FFTW.ESTIMATE, timelimit=Inf)
Pre-plan an optimized FFT along given dimensions (
dims) of arrays matching the shape and type of
A. (The first two arguments have the same meaning as for
fft.) Returns an object
P which represents the linear operator computed by the FFT, and which contains all of the information needed to compute
fft(A, dims) quickly.
P to an array
P * A; in general, the syntax for applying plans is much like that of matrices. (A plan can only be applied to arrays of the same size as the
A for which the plan was created.) You can also apply a plan with a preallocated output array
Â by calling
mul!(Â, plan, A). (For
mul!, however, the input array
A must be a complex floating-point array like the output
Â.) You can compute the inverse-transform plan by
inv(P) and apply the inverse plan with
P \ Â (the inverse plan is cached and reused for subsequent calls to
\), and apply the inverse plan to a pre-allocated output array
ldiv!(A, P, Â).
flags argument is a bitwise-or of FFTW planner flags, defaulting to
FFTW.ESTIMATE. e.g. passing
FFTW.PATIENT will instead spend several seconds (or more) benchmarking different possible FFT algorithms and picking the fastest one; see the FFTW manual for more information on planner flags. The optional
timelimit argument specifies a rough upper bound on the allowed planning time, in seconds. Passing
FFTW.PATIENT may cause the input array
A to be overwritten with zeros during plan creation.
plan_fft! is the same as
plan_fft but creates a plan that operates in-place on its argument (which must be an array of complex floating-point numbers).
plan_ifft and so on are similar but produce plans that perform the equivalent of the inverse transforms
ifft and so on.
plan_fft!(A [, dims]; flags=FFTW.ESTIMATE, timelimit=Inf)
plan_fft, but operates in-place on
plan_ifft!(A [, dims]; flags=FFTW.ESTIMATE, timelimit=Inf)
plan_ifft, but operates in-place on
plan_bfft!(A [, dims]; flags=FFTW.ESTIMATE, timelimit=Inf)
plan_bfft, but operates in-place on
rfft(A [, dims])
Multidimensional FFT of a real array
A, exploiting the fact that the transform has conjugate symmetry in order to save roughly half the computational time and storage costs compared with
A has size
(n_1, ..., n_d), the result has size
(div(n_1,2)+1, ..., n_d).
dims argument specifies an iterable subset of one or more dimensions of
A to transform, similar to
fft. Instead of (roughly) halving the first dimension of
A in the result, the
dims dimension is (roughly) halved in the same way.
irfft(A, d [, dims])
rfft: for a complex array
A, gives the corresponding real array whose FFT yields
A in the first half. As for
dims is an optional subset of dimensions to transform, defaulting to
d is the length of the transformed real array along the
dims dimension, which must satisfy
div(d,2)+1 == size(A,dims). (This parameter cannot be inferred from
size(A) since both
2*size(A,dims)-2 as well as
2*size(A,dims)-1 are valid sizes for the transformed real array.)
Swap the first and second halves of each dimension of
Swap the first and second halves of the given dimension or iterable of dimensions of array
Undoes the effect of