aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/src/Model_Poly.py
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-09-27 12:49:04 +0200
committerandreas128 <Andreas>2017-09-27 12:49:04 +0200
commit02a0b7419fc5b7aaf18fb9be4ed0888defa77e2d (patch)
treec49c05edc82af242de4b07ad97a9d3307457f072 /dpd/src/Model_Poly.py
parent38e4b3a35d4265844641d4527d8952080c0d0d79 (diff)
downloaddabmod-02a0b7419fc5b7aaf18fb9be4ed0888defa77e2d.tar.gz
dabmod-02a0b7419fc5b7aaf18fb9be4ed0888defa77e2d.tar.bz2
dabmod-02a0b7419fc5b7aaf18fb9be4ed0888defa77e2d.zip
Move consts to Const.py; Cleanup
Diffstat (limited to 'dpd/src/Model_Poly.py')
-rw-r--r--dpd/src/Model_Poly.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/dpd/src/Model_Poly.py b/dpd/src/Model_Poly.py
index e799f1e..6a74bea 100644
--- a/dpd/src/Model_Poly.py
+++ b/dpd/src/Model_Poly.py
@@ -5,15 +5,12 @@
# http://www.opendigitalradio.org
# Licence: The MIT License, see notice at the end of this file
-import datetime
import os
import logging
logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
import numpy as np
-import matplotlib.pyplot as plt
-from sklearn import linear_model
import src.Model_AM as Model_AM
import src.Model_PM as Model_PM
@@ -24,6 +21,7 @@ def assert_np_float32(x):
assert x.dtype == np.float32
assert x.flags.contiguous
+
def _check_input_get_next_coefs(tx_abs, rx_abs, phase_diff):
assert_np_float32(tx_abs)
assert_np_float32(rx_abs)
@@ -64,6 +62,7 @@ class Poly:
return self.coefs_am, self.coefs_pm
def train(self, tx_abs, rx_abs, phase_diff):
+ # type: (np.ndarray, np.ndarray, np.ndarray) -> (str, np.ndarray, np.ndarray)
_check_input_get_next_coefs(tx_abs, rx_abs, phase_diff)
coefs_am_new = self.model_am.get_next_coefs(tx_abs, rx_abs, self.coefs_am)