X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=research%2FTCS%2F2012-09-27%2FSi%2Ffocus%2Fdeflection%2Fanalysis.py;fp=research%2FTCS%2F2012-09-27%2FSi%2Ffocus%2Fdeflection%2Fanalysis.py;h=478308d7b0f3f4c3e43dc5aeed1f0313e2c1ea73;hb=1579d274d421613e82124a089e1f6884171947af;hp=0000000000000000000000000000000000000000;hpb=f1878eefc82b0c465c0062b89ef39fdb4926e8cb;p=matches%2Fhonours.git diff --git a/research/TCS/2012-09-27/Si/focus/deflection/analysis.py b/research/TCS/2012-09-27/Si/focus/deflection/analysis.py new file mode 100755 index 00000000..478308d7 --- /dev/null +++ b/research/TCS/2012-09-27/Si/focus/deflection/analysis.py @@ -0,0 +1,33 @@ +#!/usr/bin/python -u + + +import os, sys +lib_path = os.path.abspath('../../../..') +sys.path.append(lib_path) +import process + +dirs = process.GetDataSets(".", process.DoNothing) + + +process.gnuplot("set title \"Vary Deflection Voltage\"") +#process.gnuplot("set xlabel \"Vd (Volts)\"") +#process.gnuplot("set ylabel \"Normalised S(E)\"") +process.gnuplot("set key outside right") + +max_curve = [] + +#include_range=[-7.00,-5.00] +include_range=[-400,400] + +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")) + + +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()