Script execution
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user