| serg271 2007-04-18, 4:06 am |
| On Apr 17, 10:48 pm, heiko liebhart <heiko.liebh...@googlemail.com>
wrote:
> greetings
>
> i am quite as new to programming in general and to fortran in particular
> as to programming ffts.
>
> as i wanted to apply a fouriertransformation to one of my progs for
> pulseshaping i started with the subroutine four1 provided in numerical
> recipes.
>
> as a start i used a gaussian as input data expecting to get another
> gaussian as output data.
>
> so i generated the input values, filled in the zeros in the imag part in
> order to use a real function, called the subroutine an off we go for the
> crunching.
>
> after rearranging the outputarray in the way according to the book i had
> to realize unfortunately the output i got was not really what i suspected.
>
> what i got was something like a double gaussian. i.e. the sign was
> alternating. like sign of every second value was inverted oszillating
> from plus to minus.
>
Looks like you have some problem with output data rearranging, or
understanding it. Could be that in output even are real parts and odd
are imaginary parts ?
If you are looking for alternative FFT source code, you can also try
KissFFT
http://sourceforge.net/projects/kissfft/
It have implementation for real fft and multidimentional fft, which is
especially relevant to image processing.
|