For Programmers: Free Programming Magazines  


Home > Archive > Fortran > April 2007 > Re: fft from numerical recipes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: fft from numerical recipes
heiko liebhart

2007-04-19, 7:05 pm

heiko liebhart schrieb:
> 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.
>
> in the next step i took a sin wave as input.
> again what i got was not the suspected delta peak at the frequency of
> the oszillation but two antsymmetric peaks in the imaginary part.
> according to the symmetry mentioned in the book this should be right for
> a real and odd funktion like sin but is not fitting to my understanding
> of fouriertransformation.
>
> i was wondering whats going wrong. is the trick in the rearranging of
> the output or even deeper in the theory of the transformation so that
> maybe i would have to use the product of H and H*.
>
> can somebody please give me a hand to get me through this numerical
> jungle even step by step.
>
> i would appreciate every hint and assistance.
>
> thanks alot


helllo again

i was overwhelmed by all the feedback and would like to thank you all
for your suggestions and the very usefull posting of the page

http://cimss.ssec.wisc.edu/~paulv/f...comparison.html
pointing out the problem i am encountering

referring to some suggestion i would like to say.

1)although i am quite new to the topic i am aware of the nyquist theorem
and i am aware of the fact that the procedure is not doing an analytical
FT but a discrete FT i.e. finite fourier series.

2) i also posted in the numerical recipes forum first but got about 80
views and one answer. but nothing helpfull at all.

3)as for the choice of the language fortran was the first choice because
the other program is in fortran

rearanging the data is the deal

thanks for all the assistance
glen herrmannsfeldt

2007-04-19, 7:05 pm

heiko liebhart wrote:

(snip)

> 3)as for the choice of the language fortran was the first choice because
> the other program is in fortran


Yes, that is fine, but Fortran is not the best language for
learning the properties of FFT.

If you use R, you can easily graph the results of the FFT and
quickly learn what the transform of different functions looks
like in the visual sense. It is much easier to see in a graph
than a large table of numbers.

-- glen

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com