X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=hooke%2Futil%2Ffft.py;h=87dbf11cc3af8e5ea977bac91107b47f91fb736a;hp=04fab7d71f2712792d012c697550bc7c241a17cc;hb=23bcfd05915a61e3a41d01babd291fd3089ba329;hpb=c46aaa51003a6722a28eea0e49f63ef1bb0e882d diff --git a/hooke/util/fft.py b/hooke/util/fft.py index 04fab7d..87dbf11 100644 --- a/hooke/util/fft.py +++ b/hooke/util/fft.py @@ -1,20 +1,19 @@ -# Copyright (C) 2008-2010 W. Trevor King +# Copyright (C) 2010-2012 W. Trevor King # # This file is part of Hooke. # -# Hooke is free software: you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation, either -# version 3 of the License, or (at your option) any later version. +# Hooke is free software: you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) any +# later version. # -# Hooke is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. +# Hooke is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +# details. # -# You should have received a copy of the GNU Lesser General Public -# License along with Hooke. If not, see -# . +# You should have received a copy of the GNU Lesser General Public License +# along with Hooke. If not, see . """Wrap :mod:`numpy.fft` to produce 1D unitary transforms and power spectra. @@ -114,7 +113,6 @@ def unitary_rfft(data, freq=1.0): Notes ----- - If the units on your data are Volts, and your sampling frequency is in Hz, then `freq_axis` will be in Hz, @@ -307,7 +305,7 @@ def avg_power_spectrum(data, freq=1.0, chunk_size=2048, def unitary_avg_power_spectrum(data, freq=1.0, chunk_size=2048, overlap=True, window=window_hann): - """Compute the unitary avgerage power spectrum of `data`. + """Compute the unitary average power spectrum of `data`. See Also -------- @@ -334,7 +332,6 @@ class TestRFFT (unittest.TestCase): Notes ----- - The expected return values are [#dft]_: .. math:: X_k = \sum_{m=0}^{n-1} x_m \exp^{-2\pi imk/n} @@ -372,7 +369,6 @@ class TestUnitaryRFFT (unittest.TestCase): Notes ----- - Which is: .. math:: \sum_{m=0}^{n-1} |x_m|^2 dt = \sum_{k=0}^{n-1} |X_k|^2 df @@ -421,7 +417,6 @@ class TestUnitaryRFFT (unittest.TestCase): Notes ----- - Analytic result: .. math:: \rfft(\rect(at)) = 1/|a|\cdot\sinc(f/a) @@ -486,7 +481,6 @@ class TestUnitaryRFFT (unittest.TestCase): Notes ----- - Analytic result: .. math::