GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit da800a3d authored by bliss administrator's avatar bliss administrator

Some corrections after testing

parent 02f2d837
......@@ -409,9 +409,13 @@ class Id19Mono(MonochromatorBase):
# For security move Y2 to the middle and move it back after the X2 movement
# Only do this if X2 > 330 !!!!!!!!
move_y2 = False
if self.X2.position > self.X2_safe_position or X2_pos > self.X2_safe_position:
Y2_act_pos = self.Y2.position
move_y2 = True
# don't move in the middle for relative movements
if relative == False:
if self.X2.position > self.X2_safe_position or X2_pos > self.X2_safe_position:
# Move in the middle only if X2 has to move
if not self.is_aprox(self.X2.position, X2_pos, 0.1):
Y2_act_pos = self.Y2.position
move_y2 = True
# determine the order of movementes in critical positions
move_to_lower_energy = True
......@@ -425,7 +429,7 @@ class Id19Mono(MonochromatorBase):
# The movement order depend on the direction we want to move!
if move_to_lower_energy:
# Be sure to have no theta angle applied when moving into the dangerous zone!
# For relatice movements, we will not move to 0
# For relative movements, we will not move to 0
if relative == False and X2_pos < self.X2_safe_position:
umv(self.THY1, 0.0,
self.THY2, 0.0)
......@@ -437,11 +441,11 @@ class Id19Mono(MonochromatorBase):
if move_y2 == True:
umv (self.Y2, 90) # move in the middle
umv (self.Y2, 90) # move in the middle, to avoid collissions
# move X2
umv(self.X2, X2_pos)
if move_y2 == True:
umv (self.Y2, Y2_act_pos)
umv (self.Y2, Y2_act_pos) #move back to mono mode position
# move Theta
umv(self.THY1, THY1_pos,
......@@ -508,16 +512,18 @@ class Id19Mono(MonochromatorBase):
# rocking curve scans
#
def tune(self):
ct_diode = 0.05
ct_diode = 0.01
# Crystal 1 rocking curve: (almost paul t1 with resolution 0.0002 deg)
plotselect (self.diode_cnt)
dscan (self.THY1, -0.05, 0.05, 500, ct_diode, save=False)
#dscan (self.THY1, -0.06, 0.01, 500, ct_diode, save=False) #Bragg scan
#dscan (self.THY1, -0.01, 0.06, 500, ct_diode, save=False) #Laue50 scan
goto_peak()
time.sleep(2)
def fine_tune(self):
ct_diode = 0.05
ct_diode = 0.01
plotselect (self.diode_cnt)
dscan (self.THY1, -0.0025, 0.0025, 100, ct_diode, save=False)
goto_peak()
......@@ -525,7 +531,7 @@ class Id19Mono(MonochromatorBase):
umvr (self.THY1, 0.0003)
time.sleep(2)
ct(1)
#ct(1)
def angle_to_distance(self, angle):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment