summaryrefslogtreecommitdiffstats
path: root/dpd/show_spectrum.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-13 15:27:35 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-13 15:27:35 +0200
commitacec874ecd00b9a1f87b0d1405f6fa1e6503d2b7 (patch)
tree41efb1b7d04af97e9310ec2ddb8304ff73eecbc2 /dpd/show_spectrum.py
parent7e536b0169cd606dac6c2f4241a520e1c68bfa4a (diff)
downloaddabmod-acec874ecd00b9a1f87b0d1405f6fa1e6503d2b7.tar.gz
dabmod-acec874ecd00b9a1f87b0d1405f6fa1e6503d2b7.tar.bz2
dabmod-acec874ecd00b9a1f87b0d1405f6fa1e6503d2b7.zip
DPD: calculate spectrum in complex double
Diffstat (limited to 'dpd/show_spectrum.py')
-rwxr-xr-xdpd/show_spectrum.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/dpd/show_spectrum.py b/dpd/show_spectrum.py
index 83ecd8d..e92c1d0 100755
--- a/dpd/show_spectrum.py
+++ b/dpd/show_spectrum.py
@@ -101,6 +101,10 @@ def get_samples(port, num_samps_to_request):
def get_spectrum(port, num_samps_to_request):
tx_ts, txframe, rx_ts, rxframe = get_samples(port, num_samps_to_request)
+ # convert to complex doubles for more dynamic range
+ txframe = txframe.astype(np.complex128)
+ rxframe = rxframe.astype(np.complex128)
+
print("Received {} & {} frames at {} and {}".format(
len(txframe), len(rxframe), tx_ts, rx_ts))