FFT_tools: modernize module docstring
authorW. Trevor King <wking@tremily.us>
Sun, 18 Nov 2012 20:56:16 +0000 (15:56 -0500)
committerW. Trevor King <wking@tremily.us>
Sun, 18 Nov 2012 21:49:21 +0000 (16:49 -0500)
FFT_tools.py

index 194787f98f352a095a9eeda86100433fcff18f03..9b9aee400c620405747c011d93ead1af1d3c973f 100644 (file)
 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, \