From faa144c050972d518b8e953b4396e6b566cd2b03 Mon Sep 17 00:00:00 2001 From: andreas128 Date: Sat, 5 Aug 2017 22:29:04 +0100 Subject: Add Adapt and Model, Update for minimum working pipeline --- dpd/main.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'dpd/main.py') 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) # -- cgit v1.2.3