fft_power.py
Calculate an estimate of the power spectral density
employing a Hann window and analyze bins for noise floor and peaks
INPUT:
samples - Numpy array of complex samples
samp_rate - Sampling rate
num_bins - Take FFTs of this size and average their bins
peak - Maximum value of a sample (floats are usually 1.0)
scaling - Scaling type. 'density' for power spectrum density
(units: V**2/Hz) or 'spectrum' for power spectum
(units: V**2)
peak_thresh - detect peak 'peak_thresh' dBs above the noise floor
OUTPUT:
freq - Frequency index array
sig_psd - Array of FFT power bins
nf - Noise Floor (dB)
peaks_found - List of tuples with tone freq and corresponding power
---------------------------------------------------------------------
Copyright © 2018-2019. Rice University.
RENEW OPEN SOURCE LICENSE: http://renew-wireless.org/license
---------------------------------------------------------------------