[SciPy-user] About fftpack

Couge Chen couge.chen@gmail....
Tue Oct 16 22:46:50 CDT 2007

Hi all,

Here is a piece of C++ codes to do 2D IFFT from a square complex array in
K-space to a real array with the same size in real sapce.

p_forward = rfftwnd_create_plan(numOfPoints.dim(),numOfPoints,
static void FFT(Array2D< double > &in, Array2D< fftw_complex > &out) {
  rfftwnd_one_real_to_complex(p_forward,in[0],out[0]); };

For those C++ codes, fftw2.1.5 is used. Now I want to translate those codes
into Python codes with scipy.fftpack. I used fftpack.ifft2(complex_array),
but got a new complex array. Then I compared the real part of this new
complex array with the "real_array" calculated by C++. They looked quite
So I was wondering how I use the function of fftpack to generate the same
"real_array".  Anyone could help me?

Thanks a lot!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20071016/0afb16c0/attachment.html 

More information about the SciPy-user mailing list