summaryrefslogtreecommitdiffstats
path: root/dpd/main.py
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-08-25 21:03:16 +0200
committerandreas128 <Andreas>2017-08-25 21:03:16 +0200
commitb4d9d53c39f5ac6160f84505c76c10949e0f21c3 (patch)
treec073ca1c2cf1a6e31e2f45092bef89fc2c3f13b2 /dpd/main.py
parent953dda29e7469337fec9b5c05c9796e2751e968e (diff)
downloaddabmod-b4d9d53c39f5ac6160f84505c76c10949e0f21c3.tar.gz
dabmod-b4d9d53c39f5ac6160f84505c76c10949e0f21c3.tar.bz2
dabmod-b4d9d53c39f5ac6160f84505c76c10949e0f21c3.zip
Add function to select tx amplitudes to be uniformly distributed
Diffstat (limited to 'dpd/main.py')
-rwxr-xr-xdpd/main.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/dpd/main.py b/dpd/main.py
index 853f669..19460dd 100755
--- a/dpd/main.py
+++ b/dpd/main.py
@@ -23,6 +23,7 @@ logging.basicConfig(format='%(asctime)s - %(module)s - %(levelname)s - %(message
filemode='w',
level=logging.DEBUG)
+import traceback
import src.Measure as Measure
import src.Model as Model
import src.Adapt as Adapt
@@ -91,10 +92,14 @@ logging.info(
)
for i in range(num_iter):
- txframe_aligned, tx_ts, rxframe_aligned, rx_ts = meas.get_samples()
- logging.debug("tx_ts {}, rx_ts {}".format(tx_ts, rx_ts))
- coefs_am, coefs_pm = model.get_next_coefs(txframe_aligned, rxframe_aligned)
- adapt.set_coefs(coefs_am, coefs_pm)
+ try:
+ txframe_aligned, tx_ts, rxframe_aligned, rx_ts = meas.get_samples()
+ logging.debug("tx_ts {}, rx_ts {}".format(tx_ts, rx_ts))
+ coefs_am, coefs_pm = model.get_next_coefs(txframe_aligned, rxframe_aligned)
+ adapt.set_coefs(coefs_am, coefs_pm)
+ except Exception as e:
+ logging.info("Iteration {} failed.".format(i))
+ logging.info(traceback.format_exc())
# The MIT License (MIT)
#