<DIV>thanks for the help. I think I'm understanding this a bit better. although I still don't completely understand the output. here is an example... for the input I have 1024 samples taken from a 1 Hz square wave with amplitude = 1.&nbsp; for the output I would expect an infinite number of frequencies. the output from FFT.fft(myData).real is this:</DIV>
<DIV>&nbsp;</DIV>
<DIV>.</DIV>
<DIV>.</DIV>
<DIV>.</DIV>
<DIV>-0.498 1<BR>0.0 2<BR>-0.498 3<BR>0.0 4<BR>-0.498 5<BR>0.0 6<BR>-0.498 7<BR>0.0 8<BR>-0.498 9<BR>0.0 10<BR>-0.498 11<BR>0.0 12<BR>-0.498 13<BR>0.0 14<BR>-0.498 15<BR>0.0 16<BR>-0.498 17</DIV>
<DIV>.</DIV>
<DIV>.<BR>.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm not sure why the output alternates from 0 and 0.498. I would expect 0.498 at all frequencies? why the oscillation?</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><B><I>Christian Meesters &lt;meesters@uni-mainz.de&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Jeff Peery wrote:<BR>&gt;<BR>&gt; Hello, I have a signal that I want to do a fourier transform on. I <BR>&gt; tried using FFT.fft(data).real but I don't understand the output. <BR>&gt; what is output from this function, and why doesn't it require <BR>&gt; amplitude and time as inputs?<BR><BR>Hi Jeff,<BR><BR>As Danny wrote, your input are real numbers and your output will be <BR>complex numbers. I don't want to point you to the numarray <BR>documentation once more, but you might to check out this: <BR>http://mathworld.wolfram.com/FourierSeries.html as for why you get <BR>complex numbers back. (To get only the real value part try real_fft() <BR>in numarrayl.)<BR>In general in numerical computation your input is simply a series of <BR>real numbers - of equal spacing in the dimension you want to consider. <BR>Which dimension you choose (amplitudes and time/phase or amplitudes and
 <BR>spacial frequencies and so on) is up to you. It depends on your <BR>physical or mathematical question. IMHO the best introduction you can <BR>get on Fourier Transforms &amp; programming can be found in Numerical <BR>Recipies (here the "Numerical Recipies in C"-link <BR>http://www.library.cornell.edu/nr/bookcpdf.html - check chapter 12).<BR><BR>Have fun with FFTs!<BR><BR>Cheers<BR>Christian<BR><BR>_______________________________________________<BR>Tutor maillist - Tutor@python.org<BR>http://mail.python.org/mailman/listinfo/tutor<BR></BLOCKQUOTE>