Two-dimensional Fourier transform can be accessed using
→ → which implements the Fast Fourier Transform (FFT). Fourier transform decomposes signal into its harmonic components, it is therefore useful while studying spectral frequencies present in the SPM data.The 2D FFT module provides several types of output:
and some of their combinations for convenience.
Radial sections of the two-dimensional PSDF can be conveniently obtained with → → . Several other functions producing spectral densities are described in section Statistical Analysis. It is also possible to filter images in the frequency domain using one-dimensional or two-dimensional FFT filters.
For scale and rotation-independent texture comparison it is useful to transform the PSDF from Cartesian frequency coordinates to coordinates consisting of logarithm of the spatial frequency and its direction. Scaling and rotation then become mere shifts in the new coordinates. The function → → calculates directly the transformed PSDF. The dimensionless horizontal coordinate is the angle (from 0 to 2π) the vertical is the frequency logarithm. It is possible to smooth the PSDF using a Gaussian filter of given width before the transformation.
Note that the Fourier transform treats data as being infinite, thus implying some cyclic boundary conditions. As the real data do not have these properties, it is necessary to use some windowing function to suppress the data at the edgest of the image. If you do not do this, FFT treats data as being windowed by rectangular windowing function which has really bad Fourier image thus leading to corruption of the Fourier spectrum.
Gwyddion offers several windowing functions. Most of them are formed by some sine and cosine functions that damp data correctly at the edges. In the following windowing formula table the independent variable x is from interval [0, 1] which corresponds to the normalized abscissa; for simplicity variable ξ = 2πx is used in some formulas. The available windowing types include:
Name | Formula |
---|---|
None | 1 |
Rect | 0.5 at edge points, 1 everywhere else |
Hann | |
Hamming | |
Blackmann | |
Lanczos | |
Welch | |
Nutall | |
Flat-top | |
Kaiser α | , where I_{0} is the modified Bessel function of zeroth order and α is a parameter |
Fourier transforms of data with sizes that are not factorable into small prime factors can be very slow – and many programs only implement FFT of arrays with dimensions that are powers of two.
In Gwyddion, however, the Fourier transform can be applied to data fields and lines of arbitrary dimensions, with no data resampling involved (at least since version 2.8). Fourier transforms are calculated either using the famous FFTW library or, if it is not available, using Gwyddion built-in routines that are slower but can also handle transforms of arbitrary size.
Nevertheless, if the data size is not factorable into small prime factors the transform is still considerably slower. Hence it is preferable to transform data fields of “nice” sizes.