Re: idl and pv-wave [message #7909 is a reply to message #412] |
Mon, 27 January 1997 00:00   |
Achim Hein
Messages: 42 Registered: February 1996
|
Member |
|
|
<Big Brother wrote:
<>
<> Achim Hein wrote:
<> > Try the following:
<> > wave>test=findgen(4097)
<> > wave>print,max(test-fft(test,-1),1))
<>
<> Shurely it should be max(test-fft(fft(test,-1),1)) :-)
<>
<> > wave>(31.3898,0.350983)
<>
<> fairly close, my HP gives
<> (29.4698,0.247685)
<>
<> > In IDL you will get as result:
<> > IDL>test=findgen(4097)
<> > IDL>print,max(test-fft(test,-1),1))
<> > IDL>(0.000244141,1.39110e-05)
<> > If you try to evaluate this FFT with a 4096-length, the results in
<> > > both programs are quite equal.
<>
<> test=findgen(4095)
<> print, max( test-fft(fft(test,-1), 1))
<> ( 0.00219727, -0.000417931)
<>
<> > There was a discussion some month ago with Sergei Senin...:
<> > In his opinion:
<>
<> IMHO :-)
<>
<> > > <There seems to be no mistake, but simply no check in the
<procedure > > <for the number of elements in the array being 2^X.
<>
<> > But I think:
<> > > It seems so, but I think a Fourier-Transform-Algorithm has to
<> > > run for every array length
<>
<> I do agree with you now - WAVE fft is weird.
<> I'm using it to plot amplitude and phase spectral densities, which
<> requires a certain precision, and to avoid this problem, I run a
<> "power-of-two check" routine and zero padding before doing fft.
<>
<> Sergei Senin
Thank you, I am very pleased.
Achim
PS.: I cannot get you by E-mail
--
_______________________________________________
Dipl.-Ing. A. Hein
PB2 / ZESS - Uni-GH-Siegen
Paul-Bonatz Str. 9-11
57068 Siegen
Phone: 0271/740-3362
Fax: 0271/740-2336
_______________________________________________
Please have a look at our Web-Sites:
http://www.nv.et-inf.uni-siegen.de/pb2/www_pb2
_______________________________________________
|
|
|