aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/main.py
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-08-05 22:29:04 +0100
committerandreas128 <Andreas>2017-08-05 22:29:04 +0100
commitfaa144c050972d518b8e953b4396e6b566cd2b03 (patch)
treeeae754d5177c61cfbaf8b7131d538c68947693cd /dpd/main.py
parent74846d047d1dfdc397222e7f1e8ab0c8e86a0af4 (diff)
downloaddabmod-faa144c050972d518b8e953b4396e6b566cd2b03.tar.gz
dabmod-faa144c050972d518b8e953b4396e6b566cd2b03.tar.bz2
dabmod-faa144c050972d518b8e953b4396e6b566cd2b03.zip
Add Adapt and Model, Update for minimum working pipeline
Diffstat (limited to 'dpd/main.py')
-rw-r--r--dpd/main.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/dpd/main.py b/dpd/main.py
index 427bc28..1cb6021 100644
--- a/dpd/main.py
+++ b/dpd/main.py
@@ -1,5 +1,7 @@
-#!/usr/bin/env python
# -*- coding: utf-8 -*-
+"""This Python script calculates and updates the parameter of the digital
+predistortion module of the ODR-DabMod. More precisely the complex
+coefficients of the polynom which is used for predistortion."""
import logging
logging.basicConfig(format='%(asctime)s - %(module)s - %(levelname)s - %(message)s',
@@ -7,16 +9,24 @@ logging.basicConfig(format='%(asctime)s - %(module)s - %(levelname)s - %(message
filename='/tmp/dpd.log',
filemode='w',
level=logging.DEBUG)
+
import src.Measure as Measure
+import src.Model as Model
+import src.Adapt as Adapt
port = 50055
+port_rc = 9400
+coef_path = "/home/andreas/dab/ODR-DabMod/polyCoefsCustom"
num_req = 10240
-m = Measure.Measure(port, num_req)
+meas = Measure.Measure(port, num_req)
+adapt = Adapt.Adapt(port_rc, coef_path)
+coefs = adapt.get_coefs()
+model = Model.Model(coefs)
-logging.info("Do measurement")
-m.get_samples()
-logging.info("Done")
+txframe_aligned, rxframe_aligned = meas.get_samples()
+coefs = model.get_next_coefs(txframe_aligned, rxframe_aligned)
+adapt.set_coefs(coefs)
# The MIT License (MIT)
#