Script execution

This commit is contained in:
gac-x04sa
2018-10-31 15:47:15 +01:00
parent 4770d0ef2f
commit 9d4d5c8410

View File

@@ -103,19 +103,21 @@ def set_geometry(value, apply = None):
def is_geometry_set():
return get_device("wavelength") is not None
def get_roi():
"""
"""
def set_roi():
setting = get_setting(ROI_PREFERENCE)
try:
return float(setting)
t = setting.strip().split(" ")
return (int(t[0]), int(t[1]), int(t[2]), int(t[3]))
except:
return 1.0
return (1,1, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM-1)
def set_roi(x1, y1, x2, y2):
set_setting(ROI_PREFERENCE, str((x1, y1, x2, y2)) )
self.roi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM]
self.broi = [0,0, self.pixel.PIX_XDIM-1, self.pixel.PIX_YDIM]
"""
"""
set_setting(ROI_PREFERENCE, str(int(x1)) + " " + str(int(x2)) + " " + str(int(x3)) + " " + str(int(x4)) )
###################################################################################################
# Scan callbacks
@@ -144,7 +146,7 @@ def trigger_detectors(position, scan):
print "Preset monitor counting is not supported\!"
if pix_is_on:
pixel.wait_finished()
pixel.wait_finished(5.0)
i = 0
while (mythen.is_acquiring()):