From d262c286a400983837158fc921e4d40336f78e20 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 18 Nov 2012 17:15:01 -0500 Subject: [PATCH] FFT_tools: wrap long function definition lines for PEP 8 compliance --- FFT_tools.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/FFT_tools.py b/FFT_tools.py index 8e9bbd7..352083a 100644 --- a/FFT_tools.py +++ b/FFT_tools.py @@ -177,7 +177,8 @@ def _rect(t): else: return 0 -def _test_unitary_rfft_rect(a=1.0, time_shift=5.0, samp_freq=25.6, samples=256): +def _test_unitary_rfft_rect( + a=1.0, time_shift=5.0, samp_freq=25.6, samples=256): "Show fft(rect(at)) = 1/abs(a) * _numpy.sinc(f/a)" samp_freq = _numpy.float(samp_freq) a = _numpy.float(a) @@ -227,7 +228,8 @@ def _test_unitary_rfft_rect_suite(): def _gaussian(a, t): return _numpy.exp(-a * t**2) -def _test_unitary_rfft_gaussian(a=1.0, time_shift=5.0, samp_freq=25.6, samples=256): +def _test_unitary_rfft_gaussian( + a=1.0, time_shift=5.0, samp_freq=25.6, samples=256): "Show fft(rect(at)) = 1/abs(a) * sinc(f/a)" samp_freq = _numpy.float(samp_freq) a = _numpy.float(a) @@ -439,7 +441,8 @@ def _gaussian2(area, mean, std, t): return area/(std*_numpy.sqrt(2.0*_numpy.pi)) * _numpy.exp( -0.5*((t-mean)/std)**2) -def _test_unitary_power_spectrum_gaussian(area=2.5, mean=5, std=1, samp_freq=10.24 ,samples=512): #1024 +def _test_unitary_power_spectrum_gaussian( + area=2.5, mean=5, std=1, samp_freq=10.24 ,samples=512): x = _numpy.zeros((samples,), dtype=_numpy.float) mean = _numpy.float(mean) for i in range(samples): @@ -563,9 +566,9 @@ def unitary_avg_power_spectrum(data, freq=1.0, chunk_size=2048, # The normalization approaches perfection as chunk_size -> infinity. return (freq_axis, power) -def _test_unitary_avg_power_spectrum_sin(sin_freq=10, samp_freq=512, samples=1024, - chunk_size=512, overlap=True, - window=window_hann): +def _test_unitary_avg_power_spectrum_sin( + sin_freq=10, samp_freq=512, samples=1024, chunk_size=512, overlap=True, + window=window_hann): x = _numpy.zeros((samples,), dtype=_numpy.float) samp_freq = _numpy.float(samp_freq) for i in range(samples): -- 2.26.2