From fb15a5b87f80512748640cb810057204ee1f0968 Mon Sep 17 00:00:00 2001 From: andreas128 Date: Fri, 18 Aug 2017 16:47:49 +0200 Subject: Add logging of raw signal in Model.py --- dpd/src/Model.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'dpd/src/Model.py') 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)) -- cgit v1.2.3