From: W. Trevor King Date: Sun, 18 Nov 2012 20:56:16 +0000 (-0500) Subject: FFT_tools: modernize module docstring X-Git-Tag: 0.4~16 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7b284cbbcbf626fb619440d66b35914b5bcc968;p=FFT-tools.git FFT_tools: modernize module docstring --- diff --git a/FFT_tools.py b/FFT_tools.py index 194787f..9b9aee4 100644 --- a/FFT_tools.py +++ b/FFT_tools.py @@ -17,12 +17,21 @@ Provides a unitary discrete FFT and a windowed version based on numpy.fft.rfft. +Create some fake data: + +>>> import numpy +>>> data = numpy.random.rand(10) +>>> frequency = 1 + Main entry functions: - unitary_rfft(data, freq=1.0) - power_spectrum(data, freq=1.0) - unitary_power_spectrum(data, freq=1.0) - avg_power_spectrum(data, freq=1.0, chunk_size=2048, overlap=True, window=window_hann) - unitary_avg_power_spectrum(data, freq=1.0, chunk_size=2048, overlap=True, window=window_hann) + +>>> rfft = unitary_rfft(data, freq=frequency) +>>> psd = power_spectrum(data, freq=frequency) +>>> upsd = unitary_power_spectrum(data, freq=frequency) +>>> apsd = avg_power_spectrum(data, freq=frequency, chunk_size=2048, +... overlap=True, window=window_hann) +>>> aupsd = unitary_avg_power_spectrum(data, freq=frequency, chunk_size=2048, +... overlap=True, window=window_hann) """ from numpy import log2, floor, round, ceil, abs, pi, exp, cos, sin, sqrt, \