![]() |
![]() |
Gwyddion Data Processing Library Reference Manual | ![]() |
---|
simplefftsimplefft — Simple FFT algorithm |
void gwy_fft_simple (GwyTransformDirection dir, gint n, gint istride, const gdouble *re_in, const gdouble *im_in, gint ostride, gdouble *re_out, gdouble *im_out); void gwy_fft_window (gint n, gdouble *data, GwyWindowingType windowing); void gwy_fft_window_data_field (GwyDataField *dfield, GwyOrientation orientation, GwyWindowingType windowing);
The simple one-dimensional FFT algorithm gwy_fft_hum() is used as a fallback by other functions when better implementation (FFTW3) is not available.
It works only on data sizes that are powers of 2.
void gwy_fft_simple (GwyTransformDirection dir, gint n, gint istride, const gdouble *re_in, const gdouble *im_in, gint ostride, gdouble *re_out, gdouble *im_out);
Performs FST algorithm.
This is low-level function used by other FFT functions when no better backend is available.
Strides are distances between samples in input and output arrays. Use 1 for normal `dense' arrays. To use gwy_fft_simple() with interleaved arrays, that is with alternating real and imaginary data, call it with istride=2, re_in=complex_array, im_in=complex_array+1 (and similarly for output arrays).
The output is symmetrically normalized by square root of n for both transform directions. By performing forward and then backward transform, you will obtain the original array (up to rounding errors).
dir : | Transformation direction. |
n : | Number of data points. It must be a power of 2. |
istride : | Input data stride. |
re_in : | Real part of input data. |
im_in : | Imaginary part of input data. |
ostride : | Output data stride. |
re_out : | Real part of output data. |
im_out : | Imaginary part of output data. |
void gwy_fft_window (gint n, gdouble *data, GwyWindowingType windowing);
Multiplies data by given window.
n : | Number of data values. |
data : | Data values. |
windowing : | Method used for windowing. |
void gwy_fft_window_data_field (GwyDataField *dfield, GwyOrientation orientation, GwyWindowingType windowing);
dfield : | |
orientation : | |
windowing : |
<< linestats | stats >> |