Automatic commit. Fri Sep 7 00:00:05 WST 2012
[matches/honours.git] / research / TCS / 2012-09-06 / focus / 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 = {}
10
11 for f in os.listdir("."):
12         if os.path.isdir(f) == True:
13                 data_set = []
14                 for datafile in os.listdir("./"+str(f)):
15                         data_set.append(process.MaxNormalise(map(lambda e : [e[1], e[2]], process.GetData("./"+str(f)+"/"+str(datafile)))))
16
17                 avg = process.Average(data_set)
18                 dirs.update({f : avg})
19
20 process.gnuplot("set title \"Vary Focus Voltage\"")
21 process.gnuplot("set xlabel \"DAC (counts)\"")
22 process.gnuplot("set ylabel \"Normalised S(E)\"")
23
24 for p in dirs.items():
25         if (len(p[1]) > 0):
26                 process.gnuplot.replot(process.Gnuplot.Data(p[1], title=str(p[0])+"", with_="lp"))
27
28 sys.stdin.readline()

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