[SciPy-user] implementation for sine transformation?
a.u.r.e.l.i.a.n at gmx.net
Tue Apr 4 07:08:27 CDT 2006
> I'm looking for a way of calculating a sine transformation in Python, which
> I'd like to apply on a 3D-array. Does anybody know an (tested)
> implementation? Or could somebody give me a hint how to achieve this using
> a function from fftpack as a shortcut?
There is the function fftpack.fftn, which calculates the n-dimensional Fourier
Transformation. You can then use the symmetries that arise from
sin(kx) = 1/(2i) * (exp(ikx) - exp(-ikx)).
My intuition says that probably you have to substract the Fourier coefficients
for (+k) and (-k) and multiply with something like 1/2i. Please figure out
the details yourself. :-)
More information about the SciPy-user