aboutsummaryrefslogtreecommitdiffstats
path: root/plot.py
diff options
context:
space:
mode:
authorandreas128 <Andreas>2016-11-28 15:11:54 +0100
committerandreas128 <Andreas>2016-11-28 15:11:54 +0100
commit9dea632708cabd666db3f537c32cb175375725d6 (patch)
treed9c0bb87e9d13b16d362ffce129778b2cb8d4b48 /plot.py
parentffae3a0ce36edb00fe1e9b99b63fb155933f9b52 (diff)
downloadODR-StaticPrecorrection-9dea632708cabd666db3f537c32cb175375725d6.tar.gz
ODR-StaticPrecorrection-9dea632708cabd666db3f537c32cb175375725d6.tar.bz2
ODR-StaticPrecorrection-9dea632708cabd666db3f537c32cb175375725d6.zip
Make more robust to failed measurements
Diffstat (limited to 'plot.py')
-rwxr-xr-xplot.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/plot.py b/plot.py
index 8e1411a..eacf1c0 100755
--- a/plot.py
+++ b/plot.py
@@ -10,6 +10,10 @@
import numpy as np
import matplotlib.pyplot as pp
+import os
+
+if not os.path.isdir("./plots"):
+ os.makedirs("./plots")
measurements = np.loadtxt("measurements.csv", delimiter=",")
@@ -24,15 +28,17 @@ pp.subplot(312)
pp.plot(mag_feedback)
pp.subplot(313)
pp.plot(phase_diff)
+pp.savefig("plots/mag_gen-mag_feedback-pahase_diff.png")
pp.figure()
pp.scatter(mag_gen, mag_feedback)
+pp.savefig("plots/mag_gen-vs-mag_feedback.png")
pp.figure()
mag_gen_norm = mag_gen / mag_gen.max()
mag_feedback_norm = mag_feedback / mag_feedback.max()
pp.plot(mag_gen_norm - mag_feedback_norm)
+pp.savefig("plots/mag_gen-minus-mag_feedback.png")
-pp.show()
-
+#pp.show()