This commit is contained in:
2016-04-15 15:24:36 +02:00
parent 1e73b5374c
commit d4e6a3d046
12 changed files with 87 additions and 71 deletions

View File

@@ -37,14 +37,14 @@ act = 0
# do a setenergy to move theta 1 and 2 to calculated position in case they are not synchronized.
theta1 = th1.read() #TODO: setpoint?
etheta1 = a2e(abs(theta1),1,1,1,True)
etheta1 = a2e(abs(theta1),1,1,1,deg=True,ln=True)
theta2 = th2.read()
etheta2 = a2e(ABS(theta2),1,1,1,True)
etheta2 = a2e(abs(theta2),1,1,1,deg=True,ln=False)
if abs (etheta1-etheta2) > 0.01:
set_energy(e)
while abs(e-e0) > 3e-5/tan(angle(e, deg=False)): #TODO: deg==false? WHILE ABS(e-e0) GT 3e-5/TAN(ANGLE(e)) DO BEGIN
while abs(e-e0) > 3e-5/math.tan(angle(e, deg=False)): #TODO: deg==false? WHILE ABS(e-e0) GT 3e-5/TAN(ANGLE(e)) DO BEGIN
set_energy(e)
e0 = get_energy(False)
@@ -75,7 +75,7 @@ rock()
e0 = get_energy()
print e0
mono_energy.write(e0)
print caget(mono_energy.read())
print mono_energy.read()
caput(beam_err, 'Finito')
caput(beam_set, 'DONE')