aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/src/ExtractStatistic.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/ExtractStatistic.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/ExtractStatistic.py')
-rw-r--r--dpd/src/ExtractStatistic.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/dpd/src/ExtractStatistic.py b/dpd/src/ExtractStatistic.py
index d27cd77..639513a 100644
--- a/dpd/src/ExtractStatistic.py
+++ b/dpd/src/ExtractStatistic.py
@@ -8,13 +8,10 @@
import numpy as np
import matplotlib.pyplot as plt
-
import datetime
import os
import logging
-logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename)
-
def _check_input_extract(tx_dpd, rx_received):
# Check data type
@@ -64,10 +61,9 @@ class ExtractStatistic:
self.plot = c.ES_plot
def _plot_and_log(self, tx_values, rx_values, phase_diffs_values, phase_diffs_values_lists):
- if logging.getLogger().getEffectiveLevel() == logging.DEBUG and self.plot:
-
+ if self.plot and self.c.plot_location is not None:
dt = datetime.datetime.now().isoformat()
- fig_path = logging_path + "/" + dt + "_ExtractStatistic.png"
+ fig_path = self.c.plot_location + "/" + dt + "_ExtractStatistic.png"
sub_rows = 3
sub_cols = 1
fig = plt.figure(figsize=(sub_cols * 6, sub_rows / 2. * 6))