5 lib_path = os.path.abspath('../../')
6 sys.path.append(lib_path)
11 for f in os.listdir("."):
12 if os.path.isdir(f) == True:
14 for datafile in os.listdir("./"+str(f)):
15 data_set.append(process.DoNothing(map(lambda e : [e[1], e[2]], process.GetData("./"+str(f)+"/"+str(datafile)))))
17 avg = process.Average(data_set)
18 dirs.update({f : avg})
20 process.gnuplot("set title \"Vary Focus Voltage\"")
21 process.gnuplot("set xlabel \"DAC (counts)\"")
22 process.gnuplot("set ylabel \"Normalised S(E)\"")
26 for p in sorted(dirs.items(), key = lambda e : float(e[0].split("=")[1])):
28 process.gnuplot.replot(process.Gnuplot.Data(p[1], title=str(p[0])+"", with_="lp"))