summaryrefslogtreecommitdiffstats
path: root/dpd/src/RX_Agc.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/RX_Agc.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/RX_Agc.py')
-rw-r--r--dpd/src/RX_Agc.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/dpd/src/RX_Agc.py b/dpd/src/RX_Agc.py
index 7b5e0b6..f778dee 100644
--- a/dpd/src/RX_Agc.py
+++ b/dpd/src/RX_Agc.py
@@ -9,11 +9,6 @@ import datetime
import os
import logging
import time
-try:
- logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
-except AttributeError:
- logging_path = None
-
import numpy as np
import matplotlib
matplotlib.use('agg')
@@ -73,14 +68,14 @@ class Agc:
def plot_estimates(self):
"""Plots the estimate of for Max, Median, Mean for different
number of samples."""
- if logging_path is None:
+ if self.c.plot_location is None:
return
self.adapt.set_rxgain(self.min_rxgain)
time.sleep(1)
dt = datetime.datetime.now().isoformat()
- fig_path = logging_path + "/" + dt + "_agc.svg"
+ fig_path = self.c.plot_location + "/" + dt + "_agc.png"
fig, axs = plt.subplots(2, 2, figsize=(3*6,1*6))
axs = axs.ravel()