continued with optics alignment and started with sample transfer

This commit is contained in:
Holler Mirko
2024-07-08 18:00:45 +02:00
committed by wakonig_k
parent cc04810361
commit afd5d5548f
4 changed files with 1999 additions and 119 deletions

View File

@@ -426,6 +426,16 @@ class OMNYInitStagesMixin:
else:
return False
class OMNYSampleTransferMixin:
def _otransfer_gripper_safe_xray_in_operation(self):
#if(!_ogalil_all_axes_on_all_controllers_are_referenced())
#{
# printf("Not all axes are referenced. Aborting.\n")
# exit
#}
#_otransfer_gripper_to_park_z
#}'
class FlomniSampleTransferMixin:
@@ -1291,6 +1301,17 @@ class OMNY(
self.special_angles = []
self.special_angle_repeats = 1
@property
def near_field(self):
val = self.client.get_global_var("near_field")
if val is None:
return False
return val
@near_field.setter
def near_field(self, val: bool):
self.client.set_global_var("near_field", val)
@property
def tomo_shellstep(self):
val = self.client.get_global_var("tomo_shellstep")

View File

@@ -81,131 +81,125 @@ class OMNYOpticsMixin:
return False
def oeye_xray_in(self):
self._otransfer_gripper_safe_xray_in_operation()
if(!_oshield_is_ST_closed())
{
printf("The shield of the sample stage is not closed. Aborting.\n")
exit
}
if self._oeye_xray_is_in():
pass
else:
#todo
# self._otransfer_gripper_safe_xray_in_operation()
#if(!_oshield_is_ST_closed())
#{
# printf("The shield of the sample stage is not closed. Aborting.\n")
# exit
#}
omny_oeye_xray_inx = self._get_user_param_safe("oeyex", "xray_in")
omny_oeye_xray_iny = self._get_user_param_safe("oeyey", "xray_in")
omny_oeye_xray_inz = self._get_user_param_safe("oeyez", "xray_in")
_oeyey_mv _omny_oeye_xray_iny
if (fabs(A[oeyey]-_omny_oeye_xray_iny)>0.1)
{
printf("The oeye did not move up. Aborting.\n")
exit
}
umv oeyex _omny_oeye_xray_inx oeyez -2
#initial position for the vis light microscope
#do not open the shield when the microscope is at the vis mic position
#found eoeyx -45.13, z -84.9, y 0.64
#for a samy position of 2.8 with delta off
#the osa position should be in z around 7.4. in x it seems better
#around -0.6, where potentially xrays dont pass anymore
#
}'
self._oeyey_mv(omny_oeye_xray_iny)
omny_oeye_currenty = dev.oeyey.get().readback
if np.fabs(omny_oeye_currenty-omny_oeye_xray_iny)>0.1:
raise OMNYError("The oeye did not move up.\n")
umv(dev.oeyex, omny_oeye_xray_inx, dev.oeyez, omny_oeye_xray_inz)
#some notes for the vis microscope:
#initial position for the vis light microscope
#do not open the shield when the microscope is at the vis mic position
#found eoeyx -45.13, z -84.9, y 0.64
#for a samy position of 2.8 with delta off
#the osa position should be in z around 7.4. in x it seems better
#around -0.6, where potentially xrays dont pass anymore
#
def _oosa_check_y '{
if(fabs(A[oosay]-0.9)>0.05)
umv oosay 0.9
if(fabs(A[oosay]-0.9)>0.1)
{
printf("oosay is not around 0.9. Aborting.")
exit
}
}'
def _oosa_check_y(self):
omny_oosa_currenty = dev.oosay.get().readback
if np.fabs(omny_oosa_currenty-0.9)>0.05:
umv(dev.oosay, 0.9)
omny_oosa_currenty = dev.oosay.get().readback
if np.fabs(omny_oosa_currenty-0.9)>0.05:
raise OMNYError("oosay is not around 0.9. Aborting.")
def _oosa_to_move_corridor '{
_oosa_check_y
set_lm oosax -3 3.7 #risk collision with shield
umv oosax -2
if(fabs(A[oosax]+2)>0.1)
{
printf("oosax did not reach target position. Not moving in z.\n")
exit
}
}'
def _oosa_to_move_corridor(self):
self._oosa_check_y()
dev.oosax.limits = [-3, 3.7] #risk collision with shield
umv(dev.oosax, -2)
dev.oosax.read(cached=False)
omny_oosa_currentx = dev.oosax.get().readback
if np.fabs(omny_oosa_currentx+2)>0.1:
raise OMNYError("oosax did not reach target position. Not moving in z.\n")
def oosa_in '{
_omnycam_samplestage
_oosa_check_y
if(A[oshield]<15)
_oshield_ST_close
global near_field
if(near_field==0){
if (A[oosaz]<6.4)
_oosa_to_move_corridor
set_lm oosaz 6.4 6.6
umv oosaz 6.5
umv oosax 3.0270-0.005
umv oosay 0.4122
def oosa_in(self):
#todo _omnycam_samplestage
self._oosa_check_y()
dev.oshield.read(cached=False)
omny_oshield_current = dev.oshield.get().readback
if omny_oshield_current<15:
#todo _oshield_ST_close
print("todo")
if self.near_field==False:
dev.oosaz.read(cached=False)
omny_oosa_currentz = dev.oosaz.get().readback
if omny_oosa_currentz<6.4:
self._oosa_to_move_corridor()
dev.oosaz.limits = [6.4, 6.6]
umv(dev.oosaz, 6.5)
umv(dev.oosax, 3.022)
umv(oosay, 0.4122)
#### For the 30 nm FZP 220 um we use this part
# umv oosaz 6.5
# umv oosax 3.2453
# umv oosay 0.386015
#### For the 30 nm FZP 220 um we use this part
# umv oosaz 6.5
# umv oosax 3.2453
# umv oosay 0.386015
if self.near_field==True:
dev.oosaz.read(cached=False)
omny_oosa_currentz = dev.oosaz.get().readback
if omny_oosa_currentz>0:
self._oosa_to_move_corridor()
dev.oosaz.limits = [-0.4, -0.6]
umv(dev.oosaz, -0.4452)
umv(dev.oosax, 3.2124-0.008)
omny_osamy_current = dev.osamy.get().readback
if omny_osamy_current<3.25:
umv(dev.oosay, 0.5330-0.002)
else:
raise OMNYError("Failed to move oosa in. osamy position is too large.")
#todo
# _omny_interferometer_align_tracking
# rt_feedback_enable
def oosa_out(self):
#todo: _omnycam_samplestage
self._oosa_check_y()
dev.oshield.read(cached=False)
omny_oshield_current = dev.oshield.get().readback
if omny_oshield_current<15:
#todo: self._oshield_ST_close()
print("todo")
omny_oosaz_current = dev.oosaz.get().readback
if self.near_field==False:
if omny_oosaz_current<6.4:
self._oosa_to_move_corridor()
dev.oosaz.limits = [6.4, 6.6]
umv(dev.oosaz, 6.5)
umv(dev.oosax, -2)
if self.near_field==True:
if omny_oosaz_current>0:
self._oosa_to_move_corridor()
dev.oosaz.limits = [-0.4, -0.6]
umv(dev.oosaz, -0.45)
umv(dev.oosax, -2)
#todo _omny_interferometer_align_tracking
}
if(near_field==1){
if (A[oosaz]>0)
_oosa_to_move_corridor
set_lm oosaz -0.4 -0.6
umv oosaz -0.4452
umv oosax 3.2124-0.008
if (A[osamy]<3.25)
{
umv oosay 0.5330-0.002
}
else
{
printf("\n\nFailed to move in oosa. osamy is too large.\n\n\n")
exit
}
}
_omny_interferometer_align_tracking
rt_feedback_enable
}'
def oosa_out '{
_omnycam_samplestage
_oosa_check_y
if(A[oshield]<15)
_oshield_ST_close
global near_field
if(near_field==0){
if (A[oosaz]<6.4)
_oosa_to_move_corridor
set_lm oosaz 6.4 6.6
umv oosaz 6.5
umv oosax -2
}
if(near_field==1){
if (A[oosaz]>0)
_oosa_to_move_corridor
set_lm oosaz -0.4 -0.6
umv oosaz -0.45
umv oosax -2
}
_omny_interferometer_align_tracking
}'
def oosa_move_out_of_shield '{
_omnycam_samplestage
_oosa_check_y
#if (A[oosaz]>0.1)
_oosa_to_move_corridor
if (fabs(A[osamx])>0.2)
umv osamx 0
if (A[oosaz] > 0.1)
{
set_lm oosaz -0.1 0.1
umv oosaz 0
}
}'
def oosa_move_out_of_shield(self):
#todo: _omnycam_samplestage
self._oosa_check_y()
self._oosa_to_move_corridor()
omny_osamx_current = dev.osamx.get().readback
if np.fabs(omny_osamx_current)>0.2:
umv(dev.osamx, 0)
omny_oosaz_current = dev.oosaz.get().readback
if omny_oosaz_current > 0.1:
dev.oosaz.limits = [-0.1, 0.1]
umv(dev.oosaz, 0)

File diff suppressed because it is too large Load Diff

View File

@@ -392,7 +392,7 @@ oeyez:
readOnly: false
readoutPriority: baseline
userParameter:
in: 0
xray_in: -2
oeyey:
description: Xray eye Y
deviceClass: csaxs_bec.devices.omny.galil.ogalil_ophyd.OMNYGalilMotor