From bc25ed90fb34398f9fd3066b7237d1306628b16f Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 29 Dec 2017 08:32:58 +0100 Subject: Transform Const into a global config structure, avoid depending on logging for plot location --- dpd/src/Measure_Shoulders.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'dpd/src/Measure_Shoulders.py') diff --git a/dpd/src/Measure_Shoulders.py b/dpd/src/Measure_Shoulders.py index 2249ac6..fd90050 100644 --- a/dpd/src/Measure_Shoulders.py +++ b/dpd/src/Measure_Shoulders.py @@ -9,12 +9,6 @@ import datetime import os import logging import multiprocessing - -try: - logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename) -except AttributeError: - logging_path = None - import numpy as np import matplotlib.pyplot as plt @@ -82,11 +76,11 @@ class Measure_Shoulders: self.plot = c.MS_plot def _plot(self, signal): - if logging_path is None: + if self.c.plot_location is None: return dt = datetime.datetime.now().isoformat() - fig_path = logging_path + "/" + dt + "_sync_subsample_aligned.svg" + fig_path = self.c.plot_location + "/" + dt + "_sync_subsample_aligned.png" fft = calc_fft_db(signal, 100, self.c) peak, idxs_peak = _calc_peak(fft, self.c) -- cgit v1.2.3