Forums

How fftw stores data

Started by Unknown April 10, 2006
Hi
I have a question regarding the way the data is stored in a 2d fourier
transform. I am using a fftw_plan_dft_r2c_2d transform, and here is my
question:

>From what i understand of 2d fourier transforms, the dc component lies
in the centre of the transform, i.e. for a transform of size (nx,ny), the dc component would be at value (nx/2,ny/2). The fftw_plan_dft_r2c_2d transform returns a matrix of size (nx,ny/2+1). The dc component of this matrix is the value (0,0). So my question is, which part of the complete 2d fourier transform is reflected in the matrix? In other words, how do I obtain the actual 2d fourier transform from the (nx,ny/2+1) sized matrix i am getting by using the plan? With best regards, Utsav Prabhu
Most 2d FFTs (in fact, all that I can think of), including FFTW, do not
put the DC component at the center of the array, but rather at the
(0,0) corner.  See also Q3.10 in the FFTW FAQ.

Cordially,
Steven G. Johnson