diff --git a/script/FeCrXPS.py b/script/FeCrXPS.py index 25a16df7..fe324e17 100644 --- a/script/FeCrXPS.py +++ b/script/FeCrXPS.py @@ -6,7 +6,7 @@ # # skip_iteration: if set to 1 then skips after end of current iteration -global ranges, pass_energy, skip_iteration +global ranges, pass_energy, skip_iteration, ENDSCAN ranges = [] # (eph, min, max, step, time, iter) @@ -14,6 +14,7 @@ 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)) pass_energy = 50 skip_iteration = False +ENDSCAN = True from ch.psi.pshell.data.LayoutDefault import ATTR_WRITABLE_DIMENSION as ATTR_WRITABLE_DIMENSION @@ -52,6 +53,11 @@ 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) Scienta.lowEnergy.write(params[1]) Scienta.highEnergy.write(params[2]) Scienta.update() @@ -70,7 +76,7 @@ try: path="scan" + str(cur_range+1) + "/" for cur_iteration in range(params[5]): - plots[cur_range+1].setTitle(str(cur_range) + " - iteration " + str(cur_iteration+1)) + plots[cur_range+1].setTitle(str(params[0]) + " - iteration " + str(cur_iteration+1)) while True: wait_beam() trig_scienta() @@ -102,7 +108,7 @@ try: create_diag_datasets(path) append_diag_datasets(path) - plots[cur_range+1].setTitle(str(cur_range)) + plots[cur_range+1].setTitle(str(params[0])) ret.append((xdata, ydata)) finally: