Automatic commit. Fri Sep 28 00:00:03 WST 2012
[matches/honours.git] / research / TCS / 2012-09-27 / Si / focus / deflection / analysis.py
1 #!/usr/bin/python -u
2
3
4 import os, sys
5 lib_path = os.path.abspath('../../../..')
6 sys.path.append(lib_path)
7 import process
8
9 dirs = process.GetDataSets(".", process.DoNothing)
10
11
12 process.gnuplot("set title \"Vary Deflection Voltage\"")
13 #process.gnuplot("set xlabel \"Vd (Volts)\"")
14 #process.gnuplot("set ylabel \"Normalised S(E)\"")
15 process.gnuplot("set key outside right")
16
17 max_curve = []
18
19 #include_range=[-7.00,-5.00]
20 include_range=[-400,400]
21
22 for p in sorted(dirs.items(), key = lambda e : float(e[0].split("=")[1])):
23         value = float(p[0].split("=")[1])
24         if (value >= include_range[0] and value <= include_range[1]):
25                 if (len(p[1]) > 0):
26                         maxval = max(p[1], key = lambda e : e[1])
27                         max_curve.append([float(p[0].split("=")[1]), maxval[1], maxval[0]])
28                         #process.gnuplot.replot(process.Gnuplot.Data(p[1], title=str(p[0])+"", with_="lp"))
29
30
31 process.gnuplot.replot(process.Gnuplot.Data(max_curve, with_="lp", using="1:2", title="Max"))
32 process.gnuplot.replot(process.Gnuplot.Data(max_curve, with_="lp", using="1:3", title="Max position"))
33 sys.stdin.readline()

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