fft2
Functions
-
int main(int argc, char *argv[])
fft2 [ option ] [ infile ]
-l int
FFT length
-r int
number of rows
-c int
number of columns
-o int
output format
0
real and imaginary parts1
real part2
imaginary part3
amplitude spectrum4
power spectrum
-p int
output style
0
standard1
transposed2
transposed with boundary3
quadrand with boundary
infile str
double-type 2D data sequence
stdout
double-type 2D FFT sequence
The input and output are arranged as follows.
The output are reshaped by
-p
option.- Parameters:
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns:
0 on success, 1 on failure.
-
class TwoDimensionalFastFourierTransform
Calculate 2D DFT of complex-valued input data.
The inputs are two
matrices that represent real and imaginary parts: matrices: is the FFT length and must be a power of two.Public Functions
-
TwoDimensionalFastFourierTransform(int num_row, int num_column, int fft_length)
- Parameters:
num_row – [in] Number of rows,
.num_column – [in] Number of columns,
.fft_length – [in] FFT length,
.
-
inline int GetNumRow() const
- Returns:
Number of rows of input.
-
inline int GetNumColumn() const
- Returns:
Number of columns of input.
-
inline int GetFftLength() const
- Returns:
FFT length.
-
inline bool IsValid() const
- Returns:
True if this object is valid.
-
bool Run(const Matrix &real_part_input, const Matrix &imag_part_input, Matrix *real_part_output, Matrix *imag_part_output, TwoDimensionalFastFourierTransform::Buffer *buffer) const
- Parameters:
real_part_input – [in] Real part of input.
imag_part_input – [in] Imaginary part of input.
real_part_output – [out] Real part of output.
imag_part_output – [out] Imaginary part of output.
buffer – [out] Buffer.
- Returns:
True on success, false on failure.
-
class Buffer
Buffer for TwoDimensionalFastFourierTransform class.
-
TwoDimensionalFastFourierTransform(int num_row, int num_column, int fft_length)