aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/src/Measure.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 09:30:47 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 09:30:47 +0100
commit0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6 (patch)
tree520dc4ff15dbc8dba056ea03d762d570b243f27d /dpd/src/Measure.py
parent9234155749be0c9ee3ae1269f47c2240d302c21a (diff)
parent8e3338479c180418a05ab030c60ba01c2a8615ca (diff)
downloaddabmod-0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6.tar.gz
dabmod-0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6.tar.bz2
dabmod-0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6.zip
Merge branch 'next' into outputRefactoring
Diffstat (limited to 'dpd/src/Measure.py')
-rw-r--r--dpd/src/Measure.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/dpd/src/Measure.py b/dpd/src/Measure.py
index d4b1d9e..b7423c6 100644
--- a/dpd/src/Measure.py
+++ b/dpd/src/Measure.py
@@ -11,14 +11,13 @@ import struct
import numpy as np
import src.Dab_Util as DU
import os
-
import logging
-logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
class Measure:
"""Collect Measurement from DabMod"""
- def __init__(self, samplerate, port, num_samples_to_request):
+ def __init__(self, config, samplerate, port, num_samples_to_request):
logging.info("Instantiate Measure object")
+ self.c = config
self.samplerate = samplerate
self.sizeof_sample = 8 # complex floats
self.port = port
@@ -106,7 +105,7 @@ class Measure:
rx_median = np.median(np.abs(rxframe))
rxframe = rxframe / rx_median * np.median(np.abs(txframe))
- du = DU.Dab_Util(self.samplerate)
+ du = DU.Dab_Util(self.c, self.samplerate)
txframe_aligned, rxframe_aligned = du.subsample_align(txframe, rxframe)
logging.info(