Re: FFT function [message #12720] |
Thu, 27 August 1998 00:00 |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <6s38jm$2br$1@news.lth.se> "Jonas" <jonas_2@hotmail.com> writes:
> Anyone knows of differences in different fft algorithms? How should I
> perform the scaling? I need a standard scaling value that allways can be
> used, not depending of the maximum pixel values in each image.
Various types of normalizations are applied in various "flavours"
of FFT implementations. Common to most of them is the fact
that the normalizations even out when doing a forward, then
backward transform (you get back the original data).
In IDL the *forward* transform (note: "direction" = -1) is
normalized by a factor of 1/N (N is the number of points),
while the *reverse* transform is *not* normalized. I suspect
you may have swapped the definitions?
E.g.,
IDL> f=findgen(100)
IDL> print,max(imaginary(fft(f,1)))
1591.03
IDL> print,max(imaginary(fft(f,-1)))
15.9103
Some flavours do it the other way around, and some flavours
normalize with 1/sqrt(N) both ways, to keep the symmetry
(I'm a fan of symmetry..:-)
Regards,
Stein Vidar
|
|
|