summaryrefslogtreecommitdiffstats
path: root/dpd/src/Measure.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 08:32:58 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-29 08:32:58 +0100
commitbc25ed90fb34398f9fd3066b7237d1306628b16f (patch)
treede9c96d45728e96b6157e1554503e5d90f229495 /dpd/src/Measure.py
parent740d4815fda8737cc7f021999d30aeacd851b032 (diff)
downloaddabmod-bc25ed90fb34398f9fd3066b7237d1306628b16f.tar.gz
dabmod-bc25ed90fb34398f9fd3066b7237d1306628b16f.tar.bz2
dabmod-bc25ed90fb34398f9fd3066b7237d1306628b16f.zip
Transform Const into a global config structure, avoid depending on logging for plot location
Diffstat (limited to 'dpd/src/Measure.py')
-rw-r--r--dpd/src/Measure.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dpd/src/Measure.py b/dpd/src/Measure.py
index e4333d9..b7423c6 100644
--- a/dpd/src/Measure.py
+++ b/dpd/src/Measure.py
@@ -15,8 +15,9 @@ import logging
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
@@ -104,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(