![]() |
![]() |
Gwyddion Data Processing Library Reference Manual | ![]() |
---|
inttransinttrans — FFT and other integral transforms |
gint gwy_fft_find_nice_size (gint size); void gwy_data_line_fft (GwyDataLine *rsrc, GwyDataLine *isrc, GwyDataLine *rdest, GwyDataLine *idest, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level); void gwy_data_line_part_fft (GwyDataLine *rsrc, GwyDataLine *isrc, GwyDataLine *rdest, GwyDataLine *idest, gint from, gint len, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level); void gwy_data_field_1dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, GwyOrientation orientation, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level); void gwy_data_field_area_1dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, gint col, gint row, gint width, gint height, GwyOrientation orientation, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level); void gwy_data_field_2dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level); void gwy_data_field_area_2dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, gint col, gint row, gint width, gint height, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level); void gwy_data_field_2dfft_humanize (GwyDataField *data_field); void gwy_data_field_cwt (GwyDataField *data_field, GwyInterpolationType interpolation, gdouble scale, Gwy2DCWTWaveletType wtype); void gwy_data_field_fft_filter_1d (GwyDataField *data_field, GwyDataField *result_field, GwyDataLine *weights, GwyOrientation orientation, GwyInterpolationType interpolation);
gint gwy_fft_find_nice_size (gint size);
Finds a nice-for-FFT array size.
The `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 (simplefft can only handle powers of 2); and the transform is fast (this is important for FFTW backend which can handle all array sizes, but performance may suffer).
size : | Array size. Currently it must not be larger than a hard-coded maximum (64800) which should be large enough for all normal uses. |
Returns : | A nice FFT array size. |
void gwy_data_line_fft (GwyDataLine *rsrc, GwyDataLine *isrc, GwyDataLine *rdest, GwyDataLine *idest, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level);
Calculates Fast Fourier Transform of a data line.
A windowing or data leveling can be applied if requested.
rsrc : | Real input data line. |
isrc : | Imaginary input data line. |
rdest : | Real output data line. |
idest : | Imaginary output data line. |
windowing : | Windowing mode. |
direction : | FFT direction. |
interpolation : | Interpolation type. |
preserverms : | TRUE to preserve RMS value while windowing. |
level : | 0 to perform no leveling, 1 to subtract mean value, 2 to subtract line (the number can be interpreted as the first polynomial degree to keep, but only the enumerated three values are available). |
void gwy_data_line_part_fft (GwyDataLine *rsrc, GwyDataLine *isrc, GwyDataLine *rdest, GwyDataLine *idest, gint from, gint len, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level);
Calculates Fast Fourier Transform of a part of a data line.
A windowing or data leveling can be applied if requested.
rsrc : | Real input data line. |
isrc : | Imaginary input data line. |
rdest : | Real output data line, it will be resized to len. |
idest : | Imaginary output data line, it will be resized to len. |
from : | The index in input lines to start from (inclusive). |
len : | Lenght of data line part, it must be at least 4. |
windowing : | Windowing mode. |
direction : | FFT direction. |
interpolation : | Interpolation type. |
preserverms : | TRUE to preserve RMS value while windowing. |
level : | 0 to perform no leveling, 1 to subtract mean value, 2 to subtract line (the number can be interpreted as the first polynomial degree to keep, but only the enumerated three values are available). |
void gwy_data_field_1dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, GwyOrientation orientation, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level);
Transforms all rows or columns in a data field with Fast Fourier Transform.
If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results.
rin : | Real input data field. |
iin : | Imaginary input data field. It can be NULL for real-to-complex transform which can be somewhat faster than complex-to-complex transform. |
rout : | Real output data field, it will be resized to area size. |
iout : | Imaginary output data field, it will be resized to area size. |
orientation : | Orientation: pass GWY_ORIENTATION_HORIZONTAL to transform rows, GWY_ORIENTATION_VERTICAL to transform columns. |
windowing : | Windowing type. |
direction : | FFT direction. |
interpolation : | Interpolation type. |
preserverms : | TRUE to preserve RMS while windowing. |
level : | 0 to perform no leveling, 1 to subtract mean value, 2 to subtract line (the number can be interpreted as the first polynomial degree to keep, but only the enumerated three values are available). |
void gwy_data_field_area_1dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, gint col, gint row, gint width, gint height, GwyOrientation orientation, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level);
Transforms all rows or columns in a rectangular part of a data field with Fast Fourier Transform.
If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results.
rin : | Real input data field. |
iin : | Imaginary input data field. It can be NULL for real-to-complex transform which can be somewhat faster than complex-to-complex transform. |
rout : | Real output data field, it will be resized to area size. |
iout : | Imaginary output data field, it will be resized to area size. |
col : | Upper-left column coordinate. |
row : | Upper-left row coordinate. |
width : | Area width (number of columns), must be at least 4 for horizontal transforms. |
height : | Area height (number of rows), must be at least 4 for vertical transforms. |
orientation : | Orientation: pass GWY_ORIENTATION_HORIZONTAL to transform rows, GWY_ORIENTATION_VERTICAL to transform columns. |
windowing : | Windowing type. |
direction : | FFT direction. |
interpolation : | Interpolation type. |
preserverms : | TRUE to preserve RMS while windowing. |
level : | 0 to perform no leveling, 1 to subtract mean value, 2 to subtract lines (the number can be interpreted as the first polynomial degree to keep, but only the enumerated three values are available). |
void gwy_data_field_2dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level);
Calculates 2D Fast Fourier Transform of a rectangular a data field.
If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results.
rin : | Real input data field. |
iin : | Imaginary input data field. It can be NULL for real-to-complex transform which can be somewhat faster than complex-to-complex transform. |
rout : | Real output data field, it will be resized to area size. |
iout : | Imaginary output data field, it will be resized to area size. |
windowing : | Windowing type. |
direction : | FFT direction. |
interpolation : | Interpolation type. |
preserverms : | TRUE to preserve RMS while windowing. |
level : | 0 to perform no leveling, 1 to subtract mean value, 2 to subtract plane (the number can be interpreted as the first polynomial degree to keep, but only the enumerated three values are available). |
void gwy_data_field_area_2dfft (GwyDataField *rin, GwyDataField *iin, GwyDataField *rout, GwyDataField *iout, gint col, gint row, gint width, gint height, GwyWindowingType windowing, GwyTransformDirection direction, GwyInterpolationType interpolation, gboolean preserverms, gint level);
Calculates 2D Fast Fourier Transform of a rectangular area of a data field.
If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results.
rin : | Real input data field. |
iin : | Imaginary input data field. It can be NULL for real-to-complex transform which can be somewhat faster than complex-to-complex transform. |
rout : | Real output data field, it will be resized to area size. |
iout : | Imaginary output data field, it will be resized to area size. |
col : | Upper-left column coordinate. |
row : | Upper-left row coordinate. |
width : | Area width (number of columns), must be at least 4. |
height : | Area height (number of rows), must be at least 4. |
windowing : | Windowing type. |
direction : | FFT direction. |
interpolation : | Interpolation type. |
preserverms : | TRUE to preserve RMS while windowing. |
level : | 0 to perform no leveling, 1 to subtract mean value, 2 to subtract plane (the number can be interpreted as the first polynomial degree to keep, but only the enumerated three values are available). |
void gwy_data_field_2dfft_humanize (GwyDataField *data_field);
Rearranges 2D FFT output to a human-friendly form.
Top-left, top-right, bottom-left and bottom-right sub-squares are swapped to obtain a humanized 2D FFT output with (0,0) in the center.
data_field : | A data field. |
void gwy_data_field_cwt (GwyDataField *data_field, GwyInterpolationType interpolation, gdouble scale, Gwy2DCWTWaveletType wtype);
Computes a continuous wavelet transform (CWT) at given scale and using given wavelet.
data_field : | A data field. |
interpolation : | Interpolation type. |
scale : | Wavelet scale. |
wtype : | Wavelet type. |
void gwy_data_field_fft_filter_1d (GwyDataField *data_field, GwyDataField *result_field, GwyDataLine *weights, GwyOrientation orientation, GwyInterpolationType interpolation);
data_field : | |
result_field : | |
weights : | |
orientation : | |
interpolation : |
<< hough | interpolation >> |