From c7b284cbbcbf626fb619440d66b35914b5bcc968 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 18 Nov 2012 15:56:16 -0500 Subject: [PATCH] FFT_tools: modernize module docstring --- FFT_tools.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) 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, \ -- 2.26.2