Commit 96fb962b authored by Emmanuel Papillon's avatar Emmanuel Papillon
Browse files

prepare fscan2d id11

parent d5e1e7c3
......@@ -118,7 +118,53 @@ class ID11FScan(FScanDiagRunner):
pars.step_time=0.
def __call__(self, motor, start_pos, step_size, npoints, acq_time, **kwargs):
pars = dict(motor=motor, start_pos=start_pos, step_size=step_size, npoints=npoints, acq_time=acq_time, step_time=0.)
pars = dict(motor=motor,
start_pos=start_pos,
step_size=step_size,
npoints=npoints,
acq_time=acq_time,
step_time=0.,
)
pars.update(kwargs)
self.pars.set(**pars)
self.run()
class ID11FScan2D(FScanDiagRunner):
def __init__(self, scanname, scanmaster, fshutter):
self._fsh = fshutter
self._calib = ID11CameraCalib()
self._min_latency_time = 1e-5
super().__init__(scanname, scanmaster)
def validate(self):
pars = self.pars
# --- check minimum step_size
limadevs = self._master.get_controllers_found("lima")
readout_time = self._calib.calibrate(limadevs, pars.acq_time, self._fsh.shutter_time)
if pars.latency_time < self._min_latency_time:
pars.latency_time = self._min_latency_time
min_step_time = pars.acq_time + readout_time + pars.latency_time
if pars.step_time < min_step_time:
pars.step_time = min_step_time
super().validate()
pars.step_time=0.
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.,
)
pars.update(kwargs)
self.pars.set(**pars)
self.run()
......
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