mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-07-10 18:51:53 +02:00
fix: fixed galil sgalil_ophyd confusion from former commit
This commit is contained in:
@ -160,7 +160,7 @@ class GalilController(Controller):
|
|||||||
return rt_not_blocked_by_galil and air_off
|
return rt_not_blocked_by_galil and air_off
|
||||||
|
|
||||||
def axis_is_referenced(self, axis_Id_numeric) -> bool:
|
def axis_is_referenced(self, axis_Id_numeric) -> bool:
|
||||||
return bool(float(self.socket_put_and_receive(f"MG allaxref").strip()))
|
return bool(float(self.socket_put_and_receive(f"MG axisref[{axis_Id_numeric}]").strip()))
|
||||||
|
|
||||||
def show_running_threads(self) -> None:
|
def show_running_threads(self) -> None:
|
||||||
t = PrettyTable()
|
t = PrettyTable()
|
||||||
@ -218,30 +218,6 @@ class GalilController(Controller):
|
|||||||
for controller in self._controller_instances.values():
|
for controller in self._controller_instances.values():
|
||||||
if isinstance(controller, GalilController):
|
if isinstance(controller, GalilController):
|
||||||
controller.describe()
|
controller.describe()
|
||||||
|
|
||||||
@threadlocked
|
|
||||||
def fly_grid_scan(self, start_y:float, end_y:float, y_interval:int, start_x:float, end_x:float, x_interval:int, ctime:float, readtime:float) -> None:
|
|
||||||
"""_summary_
|
|
||||||
|
|
||||||
Args:
|
|
||||||
start_y (float): _description_
|
|
||||||
end_y (float): _description_
|
|
||||||
y_interval (int): _description_
|
|
||||||
start_x (float): _description_
|
|
||||||
end_x (float): _description_
|
|
||||||
x_interval (int): _description_
|
|
||||||
ctime (float): _description_
|
|
||||||
readtime (float): _description_
|
|
||||||
"""
|
|
||||||
#toDo Checking limits, checking logic for speed. SGALIL do 101 points when 100 are given
|
|
||||||
# Check sign of motors, and offsets!
|
|
||||||
speed = np.abs(end_y-start_y)/(y_interval*ctime+ (y_interval-1)*readtime)
|
|
||||||
self.socket_put_and_receive(f"a_start={start_y:.04f};a_end={end_y:.04f};speed={speed:.04f}")
|
|
||||||
step_grid = (end_x-start_x)/x_interval
|
|
||||||
gridmax = (end_x-start_x)/step_grid +1
|
|
||||||
self.socket_put_and_receive(f"b_start={start_x:.04f};gridmax={gridmax:.04f};step={step_grid:.04f}")
|
|
||||||
self.socket_put_and_receive('XQ#SAMPLE')
|
|
||||||
self.socket_put_and_receive('XQ#SCANG')
|
|
||||||
|
|
||||||
|
|
||||||
class GalilSignalBase(SocketSignal):
|
class GalilSignalBase(SocketSignal):
|
||||||
|
@ -153,7 +153,7 @@ class GalilController(Controller):
|
|||||||
return self.socket_put_and_receive(f"XQ#STOP,1")
|
return self.socket_put_and_receive(f"XQ#STOP,1")
|
||||||
|
|
||||||
def axis_is_referenced(self, axis_Id_numeric) -> bool:
|
def axis_is_referenced(self, axis_Id_numeric) -> bool:
|
||||||
return bool(float(self.socket_put_and_receive(f"MG axisref[{axis_Id_numeric}]").strip()))
|
return bool(float(self.socket_put_and_receive(f"MG allaxref").strip()))
|
||||||
|
|
||||||
def show_running_threads(self) -> None:
|
def show_running_threads(self) -> None:
|
||||||
t = PrettyTable()
|
t = PrettyTable()
|
||||||
@ -217,6 +217,30 @@ class GalilController(Controller):
|
|||||||
if isinstance(controller, GalilController):
|
if isinstance(controller, GalilController):
|
||||||
controller.describe()
|
controller.describe()
|
||||||
|
|
||||||
|
# @threadlocked
|
||||||
|
# def fly_grid_scan(self, start_y:float, end_y:float, y_interval:int, start_x:float, end_x:float, x_interval:int, ctime:float, readtime:float) -> None:
|
||||||
|
# """_summary_
|
||||||
|
|
||||||
|
# Args:
|
||||||
|
# start_y (float): _description_
|
||||||
|
# end_y (float): _description_
|
||||||
|
# y_interval (int): _description_
|
||||||
|
# start_x (float): _description_
|
||||||
|
# end_x (float): _description_
|
||||||
|
# x_interval (int): _description_
|
||||||
|
# ctime (float): _description_
|
||||||
|
# readtime (float): _description_
|
||||||
|
# """
|
||||||
|
# #toDo Checking limits, checking logic for speed. SGALIL do 101 points when 100 are given
|
||||||
|
# # Check sign of motors, and offsets!
|
||||||
|
# speed = np.abs(end_y-start_y)/(y_interval*ctime+ (y_interval-1)*readtime)
|
||||||
|
# self.socket_put_and_receive(f"a_start={start_y:.04f};a_end={end_y:.04f};speed={speed:.04f}")
|
||||||
|
# step_grid = (end_x-start_x)/x_interval
|
||||||
|
# gridmax = (end_x-start_x)/step_grid +1
|
||||||
|
# self.socket_put_and_receive(f"b_start={start_x:.04f};gridmax={gridmax:.04f};step={step_grid:.04f}")
|
||||||
|
# self.socket_put_and_receive('XQ#SAMPLE')
|
||||||
|
# self.socket_put_and_receive('XQ#SCANG')
|
||||||
|
|
||||||
|
|
||||||
class GalilSignalBase(SocketSignal):
|
class GalilSignalBase(SocketSignal):
|
||||||
def __init__(self, signal_name, **kwargs):
|
def __init__(self, signal_name, **kwargs):
|
||||||
|
Reference in New Issue
Block a user