Commit 15506ffc authored by Emmanuel Papillon's avatar Emmanuel Papillon
Browse files

force overlap ON on MARANA when used in CAMERA mode

parent 8b89310b
......@@ -8,7 +8,7 @@ from fscan.finterlaced import FInterlacedMode, FInterlacedCustomRunner
from fscan.fsweep import FSweepCustomRunner
def check_frelon_shutter_time(devs, shuttime):
def set_frelon_shutter_time(devs, shuttime):
for dev in devs:
camtype = dev._proxy.lima_type
if camtype == "Frelon":
......@@ -17,6 +17,10 @@ def check_frelon_shutter_time(devs, shuttime):
else:
dev.shutter.close_time = 0.0
def set_marana_overlap(devs, state):
for dev in devs:
if dev.name == "marana":
dev.camera.overlap = state
class ID11FTimeScan(FTimeScanCustomRunner):
def __init__(self, scanname, scanmaster, fshutter):
......@@ -25,7 +29,10 @@ class ID11FTimeScan(FTimeScanCustomRunner):
def validate(self):
limadevs = self._master.get_controllers_found("lima")
check_frelon_shutter_time(limadevs, self._fsh.shutter_time)
set_frelon_shutter_time(limadevs, self._fsh.shutter_time)
if self.pars.scan_mode == "CAMERA":
set_marana_overlap(limadevs, "ON")
super().validate()
......@@ -36,10 +43,11 @@ class ID11FScan(FScanCustomRunner):
super().__init__(scanname, scanmaster)
def validate(self):
pars = self.pars
limadevs = self._master.get_controllers_found("lima")
check_frelon_shutter_time(limadevs, self._fsh.shutter_time)
set_frelon_shutter_time(limadevs, self._fsh.shutter_time)
if self.pars.scan_mode == "CAMERA":
set_marana_overlap(limadevs, "ON")
super().validate()
......@@ -50,10 +58,11 @@ class ID11FScan2D(FScan2DCustomRunner):
super().__init__(scanname, scanmaster)
def validate(self):
pars = self.pars
limadevs = self._master.get_controllers_found("lima")
check_frelon_shutter_time(limadevs, self._fsh.shutter_time)
set_frelon_shutter_time(limadevs, self._fsh.shutter_time)
if self.pars.scan_mode == "CAMERA":
set_marana_overlap(limadevs, "ON")
super().validate()
......@@ -67,7 +76,7 @@ class ID11FSweep(FSweepCustomRunner):
pars = self.pars
limadevs = self._master.get_controllers_found("lima")
check_frelon_shutter_time(limadevs, self._fsh.shutter_time)
set_frelon_shutter_time(limadevs, self._fsh.shutter_time)
super().validate()
......@@ -82,7 +91,7 @@ class ID11FInterlaced(FInterlacedCustomRunner):
# --- frelon shutter time checks
limadevs = self._master.get_controllers_found("lima")
check_frelon_shutter_time(limadevs, self._fsh.shutter_time)
set_frelon_shutter_time(limadevs, self._fsh.shutter_time)
frelons = [ dev for dev in limadevs if dev._proxy.lima_type == "Frelon" ]
# --- shift_pos adjusted in zigzag mode with frelon
......@@ -101,4 +110,3 @@ class ID11FInterlaced(FInterlacedCustomRunner):
super().validate()
Supports Markdown
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