From 5dcaed8facd4f06874c943ea5933de7f8f7d4c89 Mon Sep 17 00:00:00 2001
From: Martin Killenberg <martin.killenberg@desy.de>
Date: Thu, 19 Jan 2023 21:06:54 +0100
Subject: [PATCH] store analysis to file

---
 .gitignore                | 1 +
 Python_script/analysis.py | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index e4fb176..f98d02a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 .idea
 *.csv
 *graph.pdf
+*analysis.pdf
 __pycache__
 
diff --git a/Python_script/analysis.py b/Python_script/analysis.py
index 91835af..5ec2ede 100644
--- a/Python_script/analysis.py
+++ b/Python_script/analysis.py
@@ -78,6 +78,9 @@ def plot_sweep(temperatures, humidities, basename, sweep_type):
     ax2.set_ylabel('S21 magnitude [dB]', color='red')
     
     fig.tight_layout()  # otherwise the right y-label is slightly clipped
+
+    fig.savefig(basename+'_analysis.pdf')
+    
     plt.show()
 
 
-- 
GitLab