GRASS GIS 8 Programmer's Manual  8.4.0dev(2024)-535c39c9fc
fft.c File Reference

Fast Fourier Transformation of Two Dimensional Satellite Data functions. More...

#include <grass/config.h>
#include <fftw3.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <grass/gmath.h>
#include <grass/gis.h>
Include dependency graph for fft.c:

Go to the source code of this file.

Macros

#define c_re(c)   ((c)[0])
 
#define c_im(c)   ((c)[1])
 

Functions

int fft2 (int i_sign, double(*data)[2], int NN, int dimc, int dimr)
 Fast Fourier Transform for two-dimensional array. More...
 
int fft (int i_sign, double *DATA[2], int NN, int dimc, int dimr)
 Fast Fourier Transform for two-dimensional array. More...
 

Detailed Description

Fast Fourier Transformation of Two Dimensional Satellite Data functions.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Author
GRASS GIS Development Team
Date
2001-2006

Definition in file fft.c.

Macro Definition Documentation

◆ c_im

#define c_im (   c)    ((c)[1])

Definition at line 41 of file fft.c.

◆ c_re

#define c_re (   c)    ((c)[0])

Definition at line 40 of file fft.c.

Function Documentation

◆ fft()

int fft ( int  i_sign,
double *  DATA[2],
int  NN,
int  dimc,
int  dimr 
)

Fast Fourier Transform for two-dimensional array.

Fast Fourier Transform for two-dimensional array.
<bNote: If passing real data to fft() forward transform (especially when using fft() in a loop), explicitly (re-)initialize the imaginary part to zero (DATA[1][i] = 0.0). Returns 0.

Parameters
[in]i_signDirection of transform -1 is normal, +1 is inverse
[in,out]DATAPointer to complex linear array in row major order containing data and result
[in]NNValue of DATA dimension (dimc * dimr)
[in]dimcValue of image column dimension (max power of 2)
[in]dimrValue of image row dimension (max power of 2)
Returns
int always returns 0

Definition at line 126 of file fft.c.

Referenced by del2g().

◆ fft2()

int fft2 ( int  i_sign,
double(*)  data[2],
int  NN,
int  dimc,
int  dimr 
)

Fast Fourier Transform for two-dimensional array.

Fast Fourier Transform for two-dimensional array.
<bNote: If passing real data to fft() forward transform (especially when using fft() in a loop), explicitly (re-)initialize the imaginary part to zero (DATA[1][i] = 0.0). Returns 0.

Parameters
[in]i_signDirection of transform -1 is normal, +1 is inverse
[in,out]dataPointer to complex linear array in row major order containing data and result
[in]NNValue of DATA dimension (dimc * dimr)
[in]dimcValue of image column dimension (max power of 2)
[in]dimrValue of image row dimension (max power of 2)
Returns
int always returns 0

Definition at line 69 of file fft.c.