summaryrefslogtreecommitdiffstats
path: root/dpd/src/Model.py
diff options
context:
space:
mode:
Diffstat (limited to 'dpd/src/Model.py')
-rw-r--r--dpd/src/Model.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/dpd/src/Model.py b/dpd/src/Model.py
index 008dc1b..07ac5a4 100644
--- a/dpd/src/Model.py
+++ b/dpd/src/Model.py
@@ -31,8 +31,8 @@ class Model:
tx_rx_frame_path = ('/tmp/tx_rx_sync_' +
datetime.datetime.now().isoformat() +
'.pdf')
- plt.plot(np.real(rxframe_aligned[:1024]), label="rxframe")
- plt.plot(np.real(txframe_aligned[:1024]), label="txframe")
+ plt.plot(np.abs(rxframe_aligned[:128]), label="rxframe")
+ plt.plot(np.abs(txframe_aligned[:128]), label="txframe")
plt.xlabel("Samples")
plt.ylabel("Real Part")
plt.legend()
@@ -40,6 +40,12 @@ class Model:
plt.clf()
logging.debug("Tx, Rx synchronized %s" % tx_rx_frame_path)
+ dt = datetime.datetime.now().isoformat()
+ txframe_path = ('/tmp/tx_3_' + dt + '.iq')
+ txframe_aligned.tofile(txframe_path)
+ rxframe_path = ('/tmp/rx_3_' + dt + '.iq')
+ rxframe_aligned.tofile(rxframe_path)
+
mse = np.mean(np.abs(np.square(txframe_aligned - rxframe_aligned)))
logging.debug("MSE: {}".format(mse))