[Numpy-FFT] data output format

  • Thread starter Giovanni Ciampaglia
  • Start date
G

Giovanni Ciampaglia

Hello everyone,
Could someone explain me what is the "steady-state" value contained into the
array returned by FFT.fft(data,n=None,axis=-1) at its first position?
Is it one of the values calculated by the FFT algorithm or some sort of control
value different from the other elements of the array?

Thanks!

p.s. I've checked www.numpy.org, but the documentation about that function is
incomplete...
--
Ciao, Giovanni aka Junkie Dolphin

Political language...is designed to make lies
sound truthful and murder respectable, and to
give an appearance of solidity to pure wind.

George Orwell
 
P

Peter Hansen

Giovanni said:
Hello everyone,
Could someone explain me what is the "steady-state" value contained into the
array returned by FFT.fft(data,n=None,axis=-1) at its first position?
Is it one of the values calculated by the FFT algorithm or some sort of control
value different from the other elements of the array?

That would likely be what I'd have called the DC (from Direct Current) value,
representing a constant offset from zero in the signal being transformed.

Basically thing of it as 0 Hz (the unchanging portion of the signal), therefore
no different from a constant offset, or "steady-state" as the man said.

Note that depending on how the FFT is calculated, this steady-state value will
likely include some amount of the near-zero frequencies, since each bin really
represents the contributions of a range of frequencies, rather than just
single, precise frequency values.

To answer the latter question then, it's just one of the values calculated
by the FFT, "no different" from the others (except for its uniqueness in being
from the unchanging portion of the input).

-Peter
 
B

Bengt Richter

That would likely be what I'd have called the DC (from Direct Current) value,
representing a constant offset from zero in the signal being transformed.

Basically thing of it as 0 Hz (the unchanging portion of the signal), therefore
no different from a constant offset, or "steady-state" as the man said.

Note that depending on how the FFT is calculated, this steady-state value will
likely include some amount of the near-zero frequencies, since each bin really
represents the contributions of a range of frequencies, rather than just
single, precise frequency values.
I like to think of it loosely as how well the data correlates with a signal
of the exact bin frequency, with phase revealed by the complex result.
To answer the latter question then, it's just one of the values calculated
by the FFT, "no different" from the others (except for its uniqueness in being
from the unchanging portion of the input).

Well, there is a real (pun intended ;-) uniqueness about the zero frequency value. I.e.,
I'd add that if the input is a sequence of real values (zero imaginary component) then
the first FFT value will be all real also, since IIRC it will the sum of all the vaues
multiplied by cos(0). The other unique value also guaranteed to be all real is at the
frequency of N/2 cycles per N-sample window, where the coefficients are also all real
and alternate cos(0), cos(pi). Since the result for all-real input is also symmetric
across the folding frequency, some FFT's exploit both symmetry and special reals and
store the value of the N/2 frequency output in the memory slot for the imaginary part
of the complex zero frequency value (so you have to split out the two values), and can
thus store the entire result destructively replacing the input in place. At least I did
that once upon a time, IIRC from ~3 decades ago, when doing that inside the 4k words of
"fast" 300ns memory (that IIRC cost more than six new VW bugs) was important ;-)

Regards,
Bengt Richter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top