Re: FFTW versus NRC FFT



Blacky wrote:
I have a problem with the FFTW algorithm, special the discrete sine
transform. Before exchanging the FFT routine known from the NRC
(numerical recipes) book by that given from FFTW, I performed some
tests. I started with the function exp(-t) which can be analytically
transformed. Applying both codes for that function the FFTW algorithm
limits into a function value of one not zero as one would think and
what the FFT NRC code does. What is the problem here? The FFT NRC code
is checked by using it before on many problems.

Most likely you are confusing the different types of DST. You should
compare the definition in NRC with:

http://www.fftw.org/doc/1d-Real_002dodd-DFTs-_0028DSTs_0029.html

In particular, if I remember correctly, the "sinft" transform that NRC
introduces corresponds to the type-I DST, or RODFT00 in FFTW (as
defined by the above link). In your code, however, you are calling
RODFT10, corresponding to a type-II DST.

Rest assured that FFTW's sine and cosine transforms are well tested and
compute exactly what the FFTW manual says. You only have to call it
correctly, and call the routine corresponding to the transform you
want.

Steven

PS. Grrr, Numerical Recipes just changed their online version to make
you jump through several hoops in order to read it.

.



Relevant Pages