From b4d9d53c39f5ac6160f84505c76c10949e0f21c3 Mon Sep 17 00:00:00 2001 From: andreas128 Date: Fri, 25 Aug 2017 21:03:16 +0200 Subject: Add function to select tx amplitudes to be uniformly distributed --- dpd/main.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'dpd/main.py') 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) # -- cgit v1.2.3