summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-09-19 20:01:49 +0200
committerandreas128 <Andreas>2017-09-19 20:01:49 +0200
commitfa3b3ac617eadba054c6f760ea9da0ceca7a32ed (patch)
tree2f4b0877ff0e0fcadf121b42b1d7da598422476f
parent9551c8adb5c909e2072b4fad6f9ebdc4c93c848a (diff)
downloaddabmod-fa3b3ac617eadba054c6f760ea9da0ceca7a32ed.tar.gz
dabmod-fa3b3ac617eadba054c6f760ea9da0ceca7a32ed.tar.bz2
dabmod-fa3b3ac617eadba054c6f760ea9da0ceca7a32ed.zip
Fix plot
-rw-r--r--dpd/src/Measure_Shoulders.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/dpd/src/Measure_Shoulders.py b/dpd/src/Measure_Shoulders.py
index d2b4b5b..4d6c125 100644
--- a/dpd/src/Measure_Shoulders.py
+++ b/dpd/src/Measure_Shoulders.py
@@ -65,6 +65,9 @@ class Measure_Shoulder:
return peak - shoulder
def _plot(self, signal):
+ dt = datetime.datetime.now().isoformat()
+ fig_path = logging_path + "/" + dt + "_sync_subsample_aligned.svg"
+
fft = self.calc_fft_db(signal, 100)
peak, idxs_peak = self._calc_peak(fft)
shoulder, idxs_sh = self._calc_shoulder_hight(fft)
@@ -87,6 +90,8 @@ class Measure_Shoulder:
ax.set_ylim(-20, 30)
fig.tight_layout()
+ fig.savefig(fig_path)
+ plt.close(fig)
def average_shoulders(self, signal, n_avg=None):
assert signal.shape[0] > 4 * self.c.MS_FFT_size