From 032cba52eae818027f6a6fe8e25b4ec6e70ca067 Mon Sep 17 00:00:00 2001 From: panepucci Date: Tue, 1 Dec 2015 10:52:43 +0100 Subject: [PATCH] Script execution --- script/rock.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/rock.py b/script/rock.py index 52a336b..b401f31 100644 --- a/script/rock.py +++ b/script/rock.py @@ -34,7 +34,7 @@ def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref = (norm, mean, sigma) = fit(ydata, xdata) if (mean is not None) and (mean <= (axis_po + dx)) and (mean >= (axis_po - dx)): caput(axis, mean) - else + else: print 'fit failed - centering on maximum' max_x= xdata[ydata.index(max(ydata))] caput(axis, max_x) @@ -42,14 +42,14 @@ def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref = if seti0 and not ffail: time.sleep(2) - run("setI0") + run("setI0") #add after_rock BPM1:SUM as reference for monitoring monochromator thermal drift if (noref==False) and not ffail: - ime.sleep(3) # wait a bit until mono theta finish moving + time.sleep(3) # wait a bit until mono theta finish moving caput('X06DA-OP-MO:MONOBEAM', beam_ref) print 'rock_success new mono beam at ' + str(beam_ref.read()) + ' at' + str(e) + ' keV' -rock(rock_axis) +#rock(rock_axis)