Script execution

This commit is contained in:
2015-12-15 14:27:06 +01:00
parent c2bd916100
commit f041f381d1

View File

@@ -2,7 +2,6 @@
#
###################################################################################################
from startup import *
def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref = False):
@@ -41,8 +40,7 @@ def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref =
else:
print 'fit failed - centering on maximum'
max_x= xdata[ydata.index(max(ydata))]
caput(axis, max_x)
caput(axis, max_x)
if seti0 and not ffail:
time.sleep(2)
@@ -51,8 +49,9 @@ def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref =
#add after_rock BPM1:SUM as reference for monitoring monochromator thermal drift
if (noref==False) and not ffail:
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'
br = beam_ref.read()
caput('X06DA-OP-MO:MONOBEAM', br)
print 'rock_success new mono beam at ' + str(br) + ' at' + str(e) + ' keV'