diff options
author | andreas128 <Andreas> | 2017-08-18 16:47:49 +0200 |
---|---|---|
committer | andreas128 <Andreas> | 2017-08-18 16:47:49 +0200 |
commit | fb15a5b87f80512748640cb810057204ee1f0968 (patch) | |
tree | c841db02186fb198a0071528dcc4dc2b08f9a9c5 /dpd/src | |
parent | 4d2def2aba436e3ab706ffef98fa8a1e1dea5634 (diff) | |
download | dabmod-fb15a5b87f80512748640cb810057204ee1f0968.tar.gz dabmod-fb15a5b87f80512748640cb810057204ee1f0968.tar.bz2 dabmod-fb15a5b87f80512748640cb810057204ee1f0968.zip |
Add logging of raw signal in Model.py
Diffstat (limited to 'dpd/src')
-rw-r--r-- | dpd/src/Model.py | 10 |
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)) |