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

Commit 6ad7857f authored by Emmanuel Papillon's avatar Emmanuel Papillon

Remove specific __call__ methods on all fscans

set marana output signal in scan preset
parent 542a2df9
import gevent
import time
from fscan.fscanrunner import FScanRunner, FScanDiagRunner
from fscan.finterlaced import FInterlacedMode
from fscan.ftimescan import FTimeScanCustomRunner
from fscan.fscan import FScanCustomRunner
from fscan.fscan2d import FScan2DCustomRunner
from fscan.finterlaced import FInterlacedMode, FInterlacedCustomRunner
def check_frelon_shutter_time(devs, shuttime):
......@@ -15,7 +17,7 @@ def check_frelon_shutter_time(devs, shuttime):
dev.shutter.close_time = 0.0
class ID11FTimeScan(FScanRunner):
class ID11FTimeScan(FTimeScanCustomRunner):
def __init__(self, scanname, scanmaster, fshutter):
self._fsh = fshutter
super().__init__(scanname, scanmaster)
......@@ -26,16 +28,8 @@ class ID11FTimeScan(FScanRunner):
super().validate()
def __call__(self, acq_time, npoints, period=0, **kwargs):
pars = dict(acq_time = acq_time,
npoints = npoints,
period = period,
)
pars.update(kwargs)
self.pars.set(**pars)
self.run()
class ID11FScan(FScanDiagRunner):
class ID11FScan(FScanCustomRunner):
def __init__(self, scanname, scanmaster, fshutter):
self._fsh = fshutter
super().__init__(scanname, scanmaster)
......@@ -46,26 +40,10 @@ class ID11FScan(FScanDiagRunner):
limadevs = self._master.get_controllers_found("lima")
check_frelon_shutter_time(limadevs, self._fsh.shutter_time)
if pars.scan_mode == "CAMERA":
if limadevs[0].name == "marana":
limadevs[0].camera.output_signal = "FIREROW1"
super().validate()
def __call__(self, motor, start_pos, step_size, npoints, acq_time, scan_mode="TIME", **kwargs):
pars = dict(motor=motor,
start_pos=start_pos,
step_size=step_size,
npoints=npoints,
acq_time=acq_time,
step_time=0.,
scan_mode=scan_mode,
)
pars.update(kwargs)
self.pars.set(**pars)
self.run()
class ID11FScan2D(FScanDiagRunner):
class ID11FScan2D(FScan2DCustomRunner):
def __init__(self, scanname, scanmaster, fshutter):
self._fsh = fshutter
super().__init__(scanname, scanmaster)
......@@ -78,26 +56,8 @@ class ID11FScan2D(FScanDiagRunner):
super().validate()
def __call__(self, slow_motor, slow_start, slow_step, slow_npoints,
fast_motor, fast_start, fast_step, fast_npoints, acq_time,
mode="REWIND", **kwargs):
pars = dict(slow_motor=slow_motor,
slow_start_pos=slow_start,
slow_step_size=slow_step,
slow_npoints=slow_npoints,
fast_motor=fast_motor,
fast_start_pos=fast_start,
fast_step_size=fast_step,
fast_npoints=fast_npoints,
acq_time=acq_time,
fast_step_time=0.,
fast_motor_mode=mode,
)
pars.update(kwargs)
self.pars.set(**pars)
self.run()
class ID11FInterlaced(FScanDiagRunner):
class ID11FInterlaced(FInterlacedCustomRunner):
def __init__(self, scanname, scanmaster, fshutter):
self._fsh = fshutter
super().__init__(scanname, scanmaster)
......@@ -126,15 +86,3 @@ class ID11FInterlaced(FScanDiagRunner):
super().validate()
def __call__(self, motor, start_pos, acq_size, npoints, acq_time, mode="ZIGZAG", **kwargs):
pars = dict(motor=motor,
start_pos=start_pos,
acq_size=acq_size,
npoints=npoints,
acq_time=acq_time,
mode=mode,
)
pars.update(kwargs)
self.pars.set(**pars)
self.run()
......@@ -127,6 +127,9 @@ class FScanMuxPreset(ScanPreset):
dev.shutter.mode = "MANUAL"
dev.shutter.close_time = 0.0
if dev.name == "marana":
dev.camera.output_signal = "FIREROW1"
if not self.fsh.is_enabled():
self.soft_fsh = False
......
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