diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-12-29 08:32:58 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-12-29 08:32:58 +0100 |
commit | bc25ed90fb34398f9fd3066b7237d1306628b16f (patch) | |
tree | de9c96d45728e96b6157e1554503e5d90f229495 /dpd/src/Symbol_align.py | |
parent | 740d4815fda8737cc7f021999d30aeacd851b032 (diff) | |
download | dabmod-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/Symbol_align.py')
-rw-r--r-- | dpd/src/Symbol_align.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/dpd/src/Symbol_align.py b/dpd/src/Symbol_align.py index f2802ee..2a17a65 100644 --- a/dpd/src/Symbol_align.py +++ b/dpd/src/Symbol_align.py @@ -8,12 +8,6 @@ import datetime import os import logging - -try: - logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename) -except: - logging_path = None - import numpy as np import scipy import matplotlib @@ -75,9 +69,9 @@ class Symbol_align: offset = peaks[np.argmin([tx_product_avg[peak] for peak in peaks])] - if logging.getLogger().getEffectiveLevel() == logging.DEBUG and self.plot and logging_path is not None: + if self.plot and self.c.plot_location is not None: dt = datetime.datetime.now().isoformat() - fig_path = logging_path + "/" + dt + "_Symbol_align.svg" + fig_path = self.c.plot_location + "/" + dt + "_Symbol_align.png" fig = plt.figure(figsize=(9, 9)) |