RENEWLab  1.1.0
RENEW project
fft_power Namespace Reference

Functions

def fft_power (samples, samp_rate, num_bins=None, peak=1.0, scaling='density', peak_thresh=10)
 
def main ()
 

Detailed Description

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

Function Documentation

◆ fft_power()

def fft_power.fft_power (   samples,
  samp_rate,
  num_bins = None,
  peak = 1.0,
  scaling = 'density',
  peak_thresh = 10 
)

◆ main()

def fft_power.main ( )
Here is the call graph for this function: