aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-09-27 12:43:40 +0200
committerandreas128 <Andreas>2017-09-27 12:43:40 +0200
commit1fff3ceab051fc795b0b09f451c2f8c4ffa59fcf (patch)
tree1648105dfd2e918939e433548a183f9d76f72d2b
parent80ae5c80144451706ba00b24046b31d89a7c0165 (diff)
downloaddabmod-1fff3ceab051fc795b0b09f451c2f8c4ffa59fcf.tar.gz
dabmod-1fff3ceab051fc795b0b09f451c2f8c4ffa59fcf.tar.bz2
dabmod-1fff3ceab051fc795b0b09f451c2f8c4ffa59fcf.zip
Make Model_Lut compatible
-rw-r--r--dpd/src/Model_Lut.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/dpd/src/Model_Lut.py b/dpd/src/Model_Lut.py
index 453ae55..d0f15df 100644
--- a/dpd/src/Model_Lut.py
+++ b/dpd/src/Model_Lut.py
@@ -1,22 +1,37 @@
+# -*- coding: utf-8 -*-
+#
+# DPD Calculation Engine, model implementation using polynomial
+#
+# http://www.opendigitalradio.org
+# Licence: The MIT License, see notice at the end of this file
+
+import os
+import logging
+
+logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
+
+import numpy as np
+
+
class Lut:
"""Implements a model that calculates lookup table coefficients"""
def __init__(self,
c,
- SA,
- MER,
learning_rate=1.,
plot=False):
+ """
+
+ :rtype:
+ """
logging.debug("Initialising LUT Model")
self.c = c
- self.SA = SA
- self.MER = MER
self.learning_rate = learning_rate
self.plot = plot
self.reset_coefs()
def reset_coefs(self):
- self.scalefactor = 0xFFFFFFFF # max uint32_t value
+ self.scalefactor = 0xFFFFFFFF # max uint32_t value
self.lut = np.ones(32, dtype=np.complex64)
def train(self, tx_abs, rx_abs, phase_diff):
@@ -47,4 +62,3 @@ class Lut:
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
-