Harmonic distortion of a input signal
Oscar Benjamin
oscar.j.benjamin at gmail.com
Tue May 21 10:58:15 EDT 2013
On 20 May 2013 18:23, jmfauth <wxjmfauth at gmail.com> wrote:
> Non sense.
>
> The discrete fft algorithm is valid only if the number of data
> points you transform does correspond to a power of 2 (2**n).
As with many of your comments about Python's unicode implementation
you are confusing performance with validity. The DFT is defined and is
a valid invertible map (barring roundoff) for complex vectors of any
integer length. It is also a valid method for understanding the
frequency content of periodic signals. The fastest FFT algorithms are
for vectors whose length is a power of 2 but the other algorithms
produce equally *valid* DFT results.
In the example I posted the computation of the DFT using numpy.fft.fft
was (as far as I could tell) instantaneous. I could use timeit to
discover exactly how many microseconds it took but why when I already
have the results I wanted?
> Keywords to the problem: apodization, zero filling, convolution
> product, ...
>
> eg. http://en.wikipedia.org/wiki/Convolution
These points are not relevant to the example given.
Oscar
More information about the Python-list
mailing list