Commit before breaking everything
[matches/honours.git] / research / TCS / 2012-09-07 / venault / analysis.py
index 0bcbaa5..e426f6b 100755 (executable)
@@ -4,29 +4,24 @@
 import os, sys
 lib_path = os.path.abspath('../../')
 sys.path.append(lib_path)
-import process
+from process import *
 
-dirs = process.GetDataSets(".", process.Derivative)
+plotList = []
 
+def sf(e):
+       e = e.split("=")
+       if len(e) == 2:
+               return float(e[1])
+       else:
+               return 0
 
-process.gnuplot("set title \"Vary Venault Voltage\"")
-process.gnuplot("set xlabel \"Vv (Volts)\"")
-#process.gnuplot("set ylabel \"Normalised S(E)\"")
-process.gnuplot("set key outside right")
 
-max_curve = []
 
-include_range=[0.0, 100.0]
+for f in sorted(os.listdir("."),key = lambda e : sf(e)):
+       if os.path.isdir(f):
+               plotList += ShowTCS(GetData(f), show_peak = False, calibrate=True, normalise=True, plot=None, title=str(f))
 
-for p in sorted(dirs.items(), key = lambda e : float(e[0].split("=")[1])):
-       value = float(p[0].split("=")[1])
-       if (value >= include_range[0] and value <= include_range[1]):
-               if (len(p[1]) > 0):
-                       maxval = max(p[1], key = lambda e : e[1])
-                       max_curve.append([float(p[0].split("=")[1]), maxval[1], maxval[0]])
-                       #process.gnuplot.replot(process.Gnuplot.Data(p[1], title=str(p[0])+"", with_="lp"))
+gnuplot.plot(*plotList)
 
 
-process.gnuplot.replot(process.Gnuplot.Data(max_curve, with_="lp", using="1:2", title="Max"))
-process.gnuplot.replot(process.Gnuplot.Data(max_curve, with_="lp", using="1:3", title="Max position"))
 sys.stdin.readline()

UCC git Repository :: git.ucc.asn.au