[SciPy-dev] FFT docstrings (was: Scipy Tutorial (and updating it))

jh@physics.uc... jh@physics.uc...
Tue Dec 16 11:05:23 CST 2008

Tom Grydeland <Tom.Grydeland@(gmail.com)> writes:
> I've started on the module page, along the direction you outlined
> above, not complete and no examples quite yet, but if people think it
> looks okay, I can try to trim down the specific routines a bit as
> well.

I like it!  A lot!

I added the helper routines and defined the time and frequency domains
near the top (and took out similar text near the bottom), fixed some
commas, etc.

I think all it needs now is examples.

One point: (I'm not sure it's worth putting these distinctions on the
page, I'm just justifying a change I made.)  Power is energy per unit
time; the energy spectrum and power spectrum are colloquially the
same.  Both are proportional to the square of the amplitude spectrum.
In areas where it matters, np.abs(A)**2 is the energy spectrum and
varies with the signal length (longer signals have more energy).  The
power spectrum is the energy spectrum divided by the time span (in
physical units) of the dataset, and is independent of the signal
length.  Both these must be adjusted by a constant to make the
sampling rate not affect the output.  The zero channel of np.fft(a) is
the mean, not the energy.  The zero channel of np.abs(A)**2 is the
total energy or power, each to within different constants.


More information about the Scipy-dev mailing list