[Numpy-discussion] Fourier transform
Pascal
pascal22p@parois....
Tue Mar 30 16:18:27 CDT 2010
Le Mon, 29 Mar 2010 16:12:56 -0600,
Charles R Harris <charlesr.harris@gmail.com> a écrit :
> On Mon, Mar 29, 2010 at 3:00 PM, Pascal <pascal22p@parois.net> wrote:
>
> > Hi,
> >
> > Does anyone have an idea how fft functions are implemented? Is it
> > pure python? based on BLAS/LAPACK? or is it using fftw?
> >
> > I successfully used numpy.fft in 3D. I would like to know if I can
> > calculate a specific a plane using the numpy.fft.
> >
> > I have in 3D:
> > r(x, y, z)=\sum_h^N-1 \sum_k^M-1 \sum_l^O-1 f_{hkl}
> > \exp(-2\pi \i (hx/N+ky/M+lz/O))
> >
> > So for the plane, z is no longer independant.
> > I need to solve the system:
> > ax+by+cz+d=0
> > r(x, y, z)=\sum_h^N-1 \sum_k^M-1 \sum_l^O-1 f_{hkl}
> > \exp(-2\pi \i (hx/N+ky/M+lz/O))
> >
> > Do you think it's possible to use numpy.fft for this?
> >
> >
> I'm not clear on what you want to do here, but note that the term in
> the in the exponent is of the form <k, x>, i.e., the inner product of
> the vectors k and x. So if you rotate x by O so that the plane is
> defined by z = 0, then <k, Ox> = <O.T, x>. That is, you can apply the
> transpose of the rotation to the result of the fft.
In other words, z is no longer independent but depends on x and y.
Apparently, nobody is calculating the exact plane but they are making a
slice in the 3D grid and doing some interpolation.
However, your answer really help me on something completely different :)
Thanks,
Pascal
More information about the NumPy-Discussion
mailing list