Draft: lima: single frame INTERNAL_TRIGGER is fine
Got that error while testing bliss tomo with BLISS 2.(1).
This assertion is maybe a bit too restrictive.
If it's fine it would be good to backport that to 2.0.
______________________________________________________________________________________________ test_take_proj ______________________________________________________________________________________________
session = <bliss.common.session.Session object at 0x7f434d1bb190>, beacon = <bliss.config.static.Config object at 0x7f434f329ca0>
lima_simulator_tango_server = ('tango://localhost:57067/id00/limaccds/simulator1', DeviceProxy(tango://localhost:57067/id00/limaccds/simulator1,139927067799040))
def test_take_proj(session, beacon, lima_simulator_tango_server):
imaging = beacon.get("tomo_imaging")
tomoconfig = imaging.tomoconfig
tomoconfig.detectors.active_detector = tomoconfig.detectors.detectors[0]
imaging.exposure_time = 0.5
gevent.sleep(1)
scan_info = None
def scan_hook(s):
nonlocal scan_info
scan_info = s.scan_info
> imaging.take_proj(scan_hook=scan_hook)
tests/controllers/test_tomo_imaging.py:35:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tomo/controllers/tomo_imaging.py:264: in take_proj
scan = runner(count_time, self.active_detector.detector, save=False)
tomo/scan/count_runner.py:45: in __call__
self._scan = self._setup_scan(
tomo/scan/count_runner.py:112: in _setup_scan
log_error("tomo", "\n")
../../Software/miniconda3/envs/blissdev/lib/python3.9/contextlib.py:126: in __exit__
next(self.gen)
../bliss.git/bliss/common/cleanup.py:290: in capture_exceptions
raise value
../bliss.git/bliss/common/cleanup.py:266: in capture
yield
tomo/scan/count_runner.py:92: in _setup_scan
proj_scan = runner(
tomo/scan/image_runner.py:40: in __call__
self._scan = self._setup_scan(
tomo/scan/image_runner.py:105: in _setup_scan
chain.add(timer, node)
../bliss.git/bliss/scanning/chain.py:1212: in add
slave.create_acquisition_object(force=False)
../bliss.git/bliss/scanning/chain.py:1508: in create_acquisition_object
acq_obj = self.get_acquisition_object(
../bliss.git/bliss/scanning/chain.py:1470: in get_acquisition_object
return self.controller.get_acquisition_object(
../bliss.git/bliss/controllers/lima/lima_base.py:236: in get_acquisition_object
return LimaAcquisitionMaster(self, ctrl_params=ctrl_params, **acq_params)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <bliss.scanning.acquisition.lima.LimaAcquisitionMaster object at 0x7f434cbf0520>, device = <bliss.controllers.lima.lima_base.Lima object at 0x7f434f6c8250>
ctrl_params = {'saving_format': 'EDF', 'saving_frame_per_file': 1, 'saving_suffix': '.edf', 'saving_max_writing_task': 4, 'saving_ma..._time_mode': 'LIVE', 'acc_max_expo_time': 2, 'acc_mode': 'STANDARD', 'acc_threshold_before': 0, 'acc_offset_before': 0}
acq_params = {'acq_expo_time': 0.5, 'acq_mode': 'SINGLE', 'acq_nb_frames': 1, 'acq_trigger_mode': 'INTERNAL_TRIGGER', ...}, prepare_once = True, start_once = False, wait_frame_id = None, acq_nb_frames = 1
acq_trigger_mode = 'INTERNAL_TRIGGER', trigger_type = <TriggerMode.SOFTWARE: 2>
msg = "{'prepare_once': True, 'start_once': False, 'acq_trigger_mode': 'INTERNAL_TRIGGER'} is incompatible, only 'INTERNAL_TRIGGER_MULTI' is valid"
def __init__(self, device, ctrl_params=None, **acq_params):
# === auto-complet missing controller parameters ======================================
ctrl_params = self.init_ctrl_params(device, ctrl_params)
...
...
...
elif prepare_once and not start_once:
if acq_trigger_mode != "INTERNAL_TRIGGER_MULTI":
msg = f"{mdict} is incompatible, only 'INTERNAL_TRIGGER_MULTI' is valid"
> raise ValueError(msg)
E ValueError: {'prepare_once': True, 'start_once': False, 'acq_trigger_mode': 'INTERNAL_TRIGGER'} is incompatible, only 'INTERNAL_TRIGGER_MULTI' is valid
../bliss.git/bliss/scanning/acquisition/lima.py:164: ValueError