Script execution
This commit is contained in:
+5
-8
@@ -10,8 +10,9 @@ global ranges, pass_energy, skip_iteration, ENDSCAN
|
||||
|
||||
ranges = []
|
||||
# (eph, min, max, step, time, iter)
|
||||
ranges.append((845.0, 125.0, 135.0, 0.5, 0.1, 2))
|
||||
ranges.append((850.0, 130.0, 140.0, 0.5, 0.1, 2))
|
||||
ranges.append((1150.0, 408.0, 445.0, 0.1, 0.2, 225))
|
||||
ranges.append((1000.0, 263.0, 295.0, 0.1, 0.2, 225))
|
||||
ranges.append((1150.0, 550.0, 580.0, 0.1, 0.2, 450))
|
||||
pass_energy = 50
|
||||
skip_iteration = False
|
||||
ENDSCAN = True
|
||||
@@ -32,7 +33,7 @@ Scienta.passEnergy = pass_energy
|
||||
names=[]
|
||||
names.append("Online Spectrum")
|
||||
for i in range(len(ranges)):
|
||||
names.append(str(ranges[i]))
|
||||
names.append(str(ranges[i][0]))
|
||||
plots = plot(None, names)
|
||||
spectrum_series = plots[0].getSeries(0)
|
||||
def plot_cur_spectrum():
|
||||
@@ -53,11 +54,7 @@ try:
|
||||
skip_iteration = False
|
||||
params = ranges[cur_range]
|
||||
Eph.move(params[0])
|
||||
print "Eph set"
|
||||
#Eph.waitReady(60)
|
||||
Eph.waitValueInRange(params[0] - 0.1, params[0] + 0.1, 10)
|
||||
print "Eph reached"
|
||||
time.sleep(10.0)
|
||||
time.sleep(5.0)
|
||||
Scienta.lowEnergy.write(params[1])
|
||||
Scienta.highEnergy.write(params[2])
|
||||
Scienta.update()
|
||||
|
||||
Reference in New Issue
Block a user