simpleFFT

simpleFFT — Simple FFT algorithm

Functions

Includes

#include <libprocess/gwyprocess.h>

Description

Generally, you should either use high-level Gwyddion functions such as gwy_data_field_fft_2d_raw() or, if they are insufficient, FFTW routines directly.

Functions

gwy_fft_find_nice_size()

gint
gwy_fft_find_nice_size (gint size);

Finds a nice-for-FFT array size.

Here ‘nice’ means three properties are guaranteed: it is greater than or equal to size ; it can be directly used with current FFT backend without scaling (since 2.8 this is true for any size); and the transform is fast, i.e. the number is highly factorable.

To be compatible with Gwyddion <= 2.7 one has to pass only data fields and lines with sizes returned by this function to raw integral transforms. Otherwise this function is mainly useful if you extend and pad the input data for other reasons and thus have the freedom to choose a convenient transform size.

Parameters

size

Transform size.

 

Returns

A nice FFT array size.


gwy_fft_window()

void
gwy_fft_window (gint n,
                gdouble *data,
                GwyWindowingType windowing);

Multiplies data by given window.

Parameters

n

Number of data values.

 

data

Data values.

 

windowing

Method used for windowing.

 

gwy_fft_window_data_field()

void
gwy_fft_window_data_field (GwyDataField *dfield,
                           GwyOrientation orientation,
                           GwyWindowingType windowing);

Performs windowing of a data field in given direction.

This is an old alias for gwy_data_field_fft_window_1d().

Parameters

dfield

A data field.

 

orientation

Windowing orientation (the same as corresponding FFT orientation).

 

windowing

The windowing type to use.

 

See Also

inttrans -- high-level integral transform functions