Use FFT averaging
This commit is contained in:
parent
fe31e6131f
commit
0eb1364cf7
@ -26,7 +26,7 @@ import os
|
||||
import code
|
||||
import signal
|
||||
import fcntl
|
||||
|
||||
fft_averages = 50
|
||||
class dsp_plugin:
|
||||
|
||||
def __init__(self):
|
||||
@ -58,7 +58,8 @@ class dsp_plugin:
|
||||
if self.csdr_through: any_chain_base+="csdr through | "
|
||||
any_chain_base+=self.format_conversion+(" | " if self.format_conversion!="" else "") ##"csdr flowcontrol {flowcontrol} auto 1.5 10 | "
|
||||
if which == "fft":
|
||||
fft_chain_base = any_chain_base+"csdr fft_cc {fft_size} {fft_block_size} | csdr logpower_cf -70 | csdr fft_exchange_sides_ff {fft_size}"
|
||||
#fft_chain_base = any_chain_base+"csdr fft_cc {fft_size} {fft_block_size} | csdr logpower_cf -70 | csdr fft_exchange_sides_ff {fft_size}"
|
||||
fft_chain_base = any_chain_base+"csdr fft_cc {fft_size} {fft_block_size} | csdr logaveragepower_cf -70 {fft_size} 50 | csdr fft_exchange_sides_ff {fft_size}"
|
||||
if self.fft_compression=="adpcm":
|
||||
return fft_chain_base+" | csdr compress_fft_adpcm_f_u8 {fft_size}"
|
||||
else:
|
||||
@ -118,7 +119,7 @@ class dsp_plugin:
|
||||
self.fft_fps=fft_fps
|
||||
|
||||
def fft_block_size(self):
|
||||
return self.samp_rate/self.fft_fps
|
||||
return self.samp_rate/self.fft_fps/fft_averages
|
||||
|
||||
def set_format_conversion(self,format_conversion):
|
||||
self.format_conversion=format_conversion
|
||||
|
Loading…
Reference in New Issue
Block a user