Closedown
This commit is contained in:
@@ -48,7 +48,7 @@ by = bpm1.read()
|
||||
print "EBOX-POSV before rock: " + str(by)
|
||||
# if beam is not off, do nothing
|
||||
if abs(by) > ymax:
|
||||
rock()
|
||||
run("rock", {"rock_axis":th1})
|
||||
|
||||
# result of ROCK
|
||||
time.sleep(2.0)
|
||||
|
||||
@@ -58,3 +58,7 @@ def fit(ydata, xdata = None):
|
||||
return (None, None, None)
|
||||
|
||||
#fit([1,2,3, 3,3,3,4,5,6,12,33,23,15,3,2,1, 1, 1, 1, 1])
|
||||
|
||||
|
||||
def rock(axis = th1):
|
||||
run("rock", {"rock_axis":th1})
|
||||
@@ -19,7 +19,7 @@ def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref =
|
||||
time.sleep(0.2)
|
||||
caput('X06DA-OP-MO1:ROX1.RDBD',0.00004)
|
||||
caput('X06DA-OP-MO1:ROX2.RDBD',0.00004)
|
||||
caputT('X06DA-OP-MO1:ROX1.RTRY',5)
|
||||
caput('X06DA-OP-MO1:ROX1.RTRY',5)
|
||||
caput('X06DA-OP-MO1:ROX2.RTRY',5)
|
||||
|
||||
#time stamp
|
||||
@@ -29,7 +29,7 @@ def rock(axis = th1, ffail = False, tt = 0.2, seti0 = False, dx = None, noref =
|
||||
#SCAN,axis,0,2*dx,20,/fit,/centre,SILENT = silent,FFAIL = ffail,time=tt,/deriv,$
|
||||
#data=d
|
||||
axis_pos = axis.read()
|
||||
lscan(axis, beam_ref, -dx, dx, 20, latency = 0.3, relative = True, context = None, before_read = None, after_read = None)
|
||||
result = lscan(axis, beam_ref, -dx, dx, 20, latency = 0.3, relative = True, context = None, before_read = None, after_read = None)
|
||||
(ydata, xdata) = (result.getReadable(0), result.getPositions(0))
|
||||
(norm, mean, sigma) = fit(ydata, xdata)
|
||||
if (mean is not None) and (mean <= (axis_po + dx)) and (mean >= (axis_po - dx)):
|
||||
|
||||
Reference in New Issue
Block a user