summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Laufer <Kraken.rf.inc@gmail.com>2022-01-03 04:16:48 +0100
committerCarl Laufer <Kraken.rf.inc@gmail.com>2022-01-03 04:16:48 +0100
commit0e04afe57a49c7d5fd8d72efd2f652753a6a788e (patch)
treeae4f4ffb10b35138f2999b9f2dcbff01793870d1
parentUpdate kill.sh (diff)
downloadkrakensdr_pr-0e04afe57a49c7d5fd8d72efd2f652753a6a788e.tar
krakensdr_pr-0e04afe57a49c7d5fd8d72efd2f652753a6a788e.tar.gz
krakensdr_pr-0e04afe57a49c7d5fd8d72efd2f652753a6a788e.tar.bz2
krakensdr_pr-0e04afe57a49c7d5fd8d72efd2f652753a6a788e.tar.lz
krakensdr_pr-0e04afe57a49c7d5fd8d72efd2f652753a6a788e.tar.xz
krakensdr_pr-0e04afe57a49c7d5fd8d72efd2f652753a6a788e.tar.zst
krakensdr_pr-0e04afe57a49c7d5fd8d72efd2f652753a6a788e.zip
-rwxr-xr-x_signal_processing/krakenSDR_signal_processor.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/_signal_processing/krakenSDR_signal_processor.py b/_signal_processing/krakenSDR_signal_processor.py
index 1282438..651fc39 100755
--- a/_signal_processing/krakenSDR_signal_processor.py
+++ b/_signal_processing/krakenSDR_signal_processor.py
@@ -234,19 +234,21 @@ class SignalProcessor(threading.Thread):
N_perseg = 0
N_perseg = min(N, len(self.processed_signal[0,:])//25)
N_perseg = N_perseg // 1
-
- # Get power spectrum
- f, Pxx_den = signal.welch(self.processed_signal, self.module_receiver.iq_header.sampling_freq//first_decimation_factor,
+
+ for m in range(self.channel_number):
+ # Get power spectrum
+ f, Pxx_den = signal.welch(self.processed_signal[m, :], self.module_receiver.iq_header.sampling_freq//first_decimation_factor,
nperseg=N_perseg,
nfft=N,
- noverlap=int(N_perseg*0.25),
+ noverlap=0, #int(N_perseg*0.25),
detrend=False,
return_onesided=False,
window= ('tukey', 0.25), #tukey window gives better time resolution for squelching #self.spectrum_window, #('tukey', 0.25), #self.spectrum_window,
#window=self.spectrum_window,
scaling="spectrum")
- self.spectrum[1:self.module_receiver.iq_header.active_ant_chs+1,:] = np.fft.fftshift(10*np.log10(Pxx_den))
+ self.spectrum[1+m, :] = np.fft.fftshift(10*np.log10(Pxx_den))
+ #self.spectrum[1:self.module_receiver.iq_header.active_ant_chs+1,:] = np.fft.fftshift(10*np.log10(Pxx_den))
self.spectrum[0,:] = np.fft.fftshift(f)