[SciPy-user] About fftpack
Couge Chen
couge.chen at gmail.com
Tue Oct 16 23:46:50 EDT 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,
FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE);
:
:
static void FFT(Array2D< double > &in, Array2D< fftw_complex > &out) {
rfftwnd_one_real_to_complex(p_forward,in[0],out[0]); };
:
:
myFFTclass::IFFT(complex_array,real_array);
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
different.
So I was wondering how I use the function of fftpack to generate the same
"real_array". Anyone could help me?
Thanks a lot!
Couge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20071016/0afb16c0/attachment.html>
More information about the SciPy-User
mailing list