473,385 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

[Numpy-FFT] data output format

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
Jul 18 '05 #1
2 5200
Giovanni Ciampaglia wrote:

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
Jul 18 '05 #2
On Tue, 21 Oct 2003 15:40:18 -0400, Peter Hansen <pe***@engcorp.com> wrote:
Giovanni Ciampaglia wrote:

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.

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
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Gary Wessle | last post by:
Hi I am trying to install NumPy in my debian/testing linux 2.6.15-1-686. with no numpy for debian/testing, I am left alone, since the experimental version available by debian will result in a...
10
by: Bryan | last post by:
hi, what is the difference among numeric, numpy and numarray? i'm going to start using matplotlib soon and i'm not sure which one i should use. this page says, "Numarray is a...
15
by: greg.landrum | last post by:
After using numeric for almost ten years, I decided to attempt to switch a large codebase (python and C++) to using numpy. Here's are some comments about how that went. - The code to...
0
by: robert | last post by:
just a note - some speed comparisons : 0.60627370238398726 0.42836673376223189 0.36965815487747022 0.016557970357098384 0.15692469294117473 0.01951756438393204
5
by: robert | last post by:
Turning algs for old NumPy modules into numpy code I suffer from this: Upon further processing of returns of numpy calculations, lots of data in an apps object tree will become elementary numpy...
3
by: Duncan Smith | last post by:
Hello, Since moving to numpy I've had a few problems with my existing code. It basically revolves around the numpy scalar types. e.g. ------------------------------------------------ array(,...
5
by: Marc Oldenhof | last post by:
Hello all, I'm pretty new to Python, but use it a lot lately. I'm getting a crazy error trying to do operations on a string list after importing numpy. Minimal example: Python 2.5.1...
2
by: sapsi | last post by:
Hello, I have a numpy array (2 rows 3 colums) import numpy a=numpy.array( , ]) I wish to add a row, this is how i do it s=a.shape numpy.resize(a,s+1,s)
3
by: Sean Davis | last post by:
I have a set of numpy arrays which I would like to save to a gzip file. Here is an example without gzip: b=numpy.ones(1000000,dtype=numpy.uint8) a=numpy.zeros(1000000,dtype=numpy.uint8) fd =...
2
by: Travis Oliphant | last post by:
I wanted to point anybody interested to a blog post that describes a useful pattern for having a NumPy array that points to the memory created by a different memory manager than the standard one...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.