aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/apply_adapt_dumps.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 08:32:58 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 08:32:58 +0100
commitbc25ed90fb34398f9fd3066b7237d1306628b16f (patch)
treede9c96d45728e96b6157e1554503e5d90f229495 /dpd/apply_adapt_dumps.py
parent740d4815fda8737cc7f021999d30aeacd851b032 (diff)
downloaddabmod-bc25ed90fb34398f9fd3066b7237d1306628b16f.tar.gz
dabmod-bc25ed90fb34398f9fd3066b7237d1306628b16f.tar.bz2
dabmod-bc25ed90fb34398f9fd3066b7237d1306628b16f.zip
Transform Const into a global config structure, avoid depending on logging for plot location
Diffstat (limited to 'dpd/apply_adapt_dumps.py')
-rwxr-xr-xdpd/apply_adapt_dumps.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/dpd/apply_adapt_dumps.py b/dpd/apply_adapt_dumps.py
index 0eb65f3..20bc013 100755
--- a/dpd/apply_adapt_dumps.py
+++ b/dpd/apply_adapt_dumps.py
@@ -16,21 +16,11 @@ logging.basicConfig(format='%(asctime)s - %(module)s - %(levelname)s - %(message
datefmt='%Y-%m-%d %H:%M:%S',
level=logging.DEBUG)
-import src.Measure as Measure
-import src.Model as Model
-import src.ExtractStatistic as ExtractStatistic
import src.Adapt as Adapt
-import src.RX_Agc as Agc
-import src.TX_Agc as TX_Agc
import argparse
-import src.Const
-import src.Symbol_align
-import src.Measure_Shoulders
-import src.MER
-
parser = argparse.ArgumentParser(
- description="DPD Computation Engine for ODR-DabMod")
+ description="Load pkl dumps DPD settings into ODR-DabMod")
parser.add_argument('--port', default=50055, type=int,
help='port of DPD server to connect to (default: 50055)',
required=False)
@@ -49,7 +39,14 @@ port_rc = cli_args.rc_port
coef_path = cli_args.coefs
filename = cli_args.file
-adapt = Adapt.Adapt(port_rc, coef_path)
+# No need to initialise a GlobalConfig since adapt only needs this one field
+class DummyConfig:
+ def __init__(self):
+ self.plot_location = None
+
+c = DummyConfig()
+
+adapt = Adapt.Adapt(c, port_rc, coef_path)
print("Loading and applying DPD settings from {}".format(filename))
adapt.load(filename)