diff options
author | andreas128 <Andreas> | 2017-08-21 20:23:17 +0200 |
---|---|---|
committer | andreas128 <Andreas> | 2017-08-21 20:23:17 +0200 |
commit | d7521876d7cb221860b0975b2a25eedca00206b7 (patch) | |
tree | d32d46ba6baca93b59b53846a3f0335f6df5d508 /dpd/src/Model.py | |
parent | 0c0d145866043c16c3dc73615f35bbac12140b93 (diff) | |
download | dabmod-d7521876d7cb221860b0975b2a25eedca00206b7.tar.gz dabmod-d7521876d7cb221860b0975b2a25eedca00206b7.tar.bz2 dabmod-d7521876d7cb221860b0975b2a25eedca00206b7.zip |
Add logging directory creation for all log files
Diffstat (limited to 'dpd/src/Model.py')
-rw-r--r-- | dpd/src/Model.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dpd/src/Model.py b/dpd/src/Model.py index 014b5ef..7664dd3 100644 --- a/dpd/src/Model.py +++ b/dpd/src/Model.py @@ -1,8 +1,11 @@ # -*- coding: utf-8 -*- -import numpy as np import datetime +import os import logging +logging_path = os.path.dirname(logging.getLoggerClass().root.handlers[0].baseFilename) + +import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt @@ -55,9 +58,9 @@ class Model: )) dt = datetime.datetime.now().isoformat() - fig_path = "/tmp/" + dt + "_Model.pdf" + fig_path = logging_path + "/" + dt + "_Model.pdf" - fig, axs = plt.subplots(5, figsize=(6,2*6)) + fig, axs = plt.subplots(4, figsize=(6,2*6)) ax = axs[0] ax.plot(np.abs(txframe_aligned[:128]), label="TX Frame") |