Closedown

This commit is contained in:
2015-12-01 10:05:55 +01:00
parent 967b7eae92
commit bba7de7c42
3 changed files with 7 additions and 3 deletions

View File

@@ -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)

View File

@@ -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})

View File

@@ -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)):