aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/src/RX_Agc.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/RX_Agc.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/RX_Agc.py')
-rw-r--r--dpd/src/RX_Agc.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/dpd/src/RX_Agc.py b/dpd/src/RX_Agc.py
index 670fbbb..f778dee 100644
--- a/dpd/src/RX_Agc.py
+++ b/dpd/src/RX_Agc.py
@@ -9,8 +9,6 @@ import datetime
import os
import logging
import time
-logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
-
import numpy as np
import matplotlib
matplotlib.use('agg')
@@ -70,11 +68,14 @@ class Agc:
def plot_estimates(self):
"""Plots the estimate of for Max, Median, Mean for different
number of samples."""
+ 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()