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, \