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

Commit 430e6e64 authored by bliss administrator's avatar bliss administrator

Activated usage of shutter and diode.

Some corrections for LL pre-positioning.
parent 6ca85f02
......@@ -7,7 +7,7 @@ import datetime
from bliss import setup_globals, global_map
from bliss.common import mapping, scans
from bliss.common import session
from bliss.common.scans import dscan
from bliss.common.scans import dscan, ct
from bliss.common.logtools import log_info, log_debug, log_error
from bliss.common.cleanup import cleanup, error_cleanup, capture_exceptions
from bliss.scanning.scan_tools import peak, goto_peak
......@@ -96,7 +96,7 @@ class Id19Mono(MonochromatorBase):
self.check_mode()
return self._mode
@mode.setter
@mode.setter
def mode (self, req_mode):
self._mode = MonoMode.UNDEFINED
......@@ -120,8 +120,9 @@ class Id19Mono(MonochromatorBase):
print ("Move Y and Z motors")
umv(self.Y1, mono_mode["Y1_pos"],
self.Y2, mono_mode["Y2_pos"],
self.Z1, 0.0,
self.Z2, mono_mode["beam_offset"])
#self.Z1, 0.0,
self.Z1, mono_mode["Z1_pos"],
self.Z2, (mono_mode["beam_offset"]+ mono_mode["Z1_pos"]))
print ("Move diode in")
self.diode_pos.IN()
......@@ -279,10 +280,10 @@ class Id19Mono(MonochromatorBase):
self.check_beam_size(theta_angle)
# refine Z1 and Z2 pos
Z1_pos = 0
Z2_pos = self.modes[self._mode]["beam_offset"]
#self.Z1, mono_mode["Z1_pos"],
#self.Z2, (mono_mode["beam_offset"]+ mono_mode["Z1_pos"]))
Z1_pos = self.modes[self._mode]["Z1_pos"]
Z2_pos = self.modes[self._mode]["beam_offset"] + Z1_pos
#
......@@ -397,7 +398,7 @@ class Id19Mono(MonochromatorBase):
# close bem shutter
print ("Close beam shutter")
#self.beam_shutter.close()
self.beam_shutter.close()
# move crystals to 0 when necessary
#if crystals_to_be_moved == True:
......@@ -414,8 +415,10 @@ class Id19Mono(MonochromatorBase):
# determine the order of movementes in critical positions
move_to_lower_energy = True
if self.calc_energy() > e_min:
if self.calc_energy() < energy:
#if self.calc_energy() > e_min:
if self.energy > e_min:
#if self.calc_energy() < energy:
if self.energy < energy:
move_to_lower_energy = False
print (move_to_lower_energy)
......@@ -476,10 +479,13 @@ class Id19Mono(MonochromatorBase):
# open beam shutter
print ("Open beam shutter")
#self.beam_shutter.open()
self.beam_shutter.open()
# tune
#self.tune()
self.tune()
# fine tune
self.fine_tune()
......@@ -502,18 +508,18 @@ class Id19Mono(MonochromatorBase):
# rocking curve scans
#
def tune(self):
ct_diode = 0.5
ct_diode = 0.05
# Crystal 1 rocking curve: (almost paul t1 with resolution 0.0002 deg)
plotselect (self.diode_cnt)
dscan (self.THY1, 0.01, -0.01, 100, ct_diode, save=False)
dscan (self.THY1, -0.05, 0.05, 500, ct_diode, save=False)
goto_peak()
time.sleep(1)
time.sleep(2)
def fine_tune(self):
ct_diode = 0.5
ct_diode = 0.05
plotselect (self.diode_cnt)
dscan (self.THY1, 0.0025, -0.0025, 100, ct_diode, save=False)
dscan (self.THY1, -0.0025, 0.0025, 100, ct_diode, save=False)
goto_peak()
time.sleep(1)
......
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