diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-12-29 09:30:47 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-12-29 09:30:47 +0100 |
commit | 0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6 (patch) | |
tree | 520dc4ff15dbc8dba056ea03d762d570b243f27d /dpd/src/phase_align.py | |
parent | 9234155749be0c9ee3ae1269f47c2240d302c21a (diff) | |
parent | 8e3338479c180418a05ab030c60ba01c2a8615ca (diff) | |
download | dabmod-0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6.tar.gz dabmod-0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6.tar.bz2 dabmod-0c0f828c6bccee3aeb3049cb8b5bb480153cd3b6.zip |
Merge branch 'next' into outputRefactoring
Diffstat (limited to 'dpd/src/phase_align.py')
-rw-r--r-- | dpd/src/phase_align.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/dpd/src/phase_align.py b/dpd/src/phase_align.py index 68c216d..8654333 100644 --- a/dpd/src/phase_align.py +++ b/dpd/src/phase_align.py @@ -7,8 +7,6 @@ import datetime import os import logging -logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename) - import numpy as np import matplotlib.pyplot as plt @@ -24,9 +22,9 @@ def phase_align(sig, ref_sig, plot=False): real_diffs = np.cos(angle_diff) imag_diffs = np.sin(angle_diff) - if logging.getLogger().getEffectiveLevel() == logging.DEBUG and plot: + if plot and self.c.plot_location is not None: dt = datetime.datetime.now().isoformat() - fig_path = logging_path + "/" + dt + "_phase_align.svg" + fig_path = self.c.plot_location + "/" + dt + "_phase_align.png" plt.subplot(511) plt.hist(angle_diff, bins=60, label="Angle Diff") |