lima2.client 3.0.0__tar.gz → 3.0a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lima2_client-3.0.0/src/lima2_client.egg-info → lima2_client-3.0a0}/PKG-INFO +1 -1
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/client.py +2 -14
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/detector.py +8 -22
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/pipeline.py +154 -276
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/pipelines/legacy.py +2 -4
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/pipelines/smx.py +10 -53
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/pipelines/xpcs.py +9 -20
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/topology.py +15 -20
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/utils.py +3 -23
- lima2_client-3.0a0/src/lima2/master_file/generate.py +247 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0/src/lima2_client.egg-info}/PKG-INFO +1 -1
- lima2_client-3.0.0/src/lima2/master_file/generate.py +0 -803
- {lima2_client-3.0.0 → lima2_client-3.0a0}/LICENSE +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/README.md +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/pyproject.toml +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/setup.cfg +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/draw_state_diagram.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/examples/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/examples/async_github_pull_request.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/examples/async_turnstile.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/examples/boolean_field.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/examples/github_pull_request.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/examples/turnstile.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/exceptions.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/finite_state_machine/state_machine.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/convert.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/devencoded/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/devencoded/dense_frame.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/devencoded/exception.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/devencoded/smx_sparse_frame.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/devencoded/sparse_frame.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/devencoded/structured_array.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/pipelines/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/pipelines/failing.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/progress_counter.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/py.typed +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/shell.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/client/state_machine.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/server/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/server/control.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/server/receiver.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2/server/timer.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2_client.egg-info/SOURCES.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2_client.egg-info/dependency_links.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2_client.egg-info/entry_points.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2_client.egg-info/requires.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a0}/src/lima2_client.egg-info/top_level.txt +0 -0
|
@@ -157,7 +157,6 @@ class Client:
|
|
|
157
157
|
acq_params=acq_params,
|
|
158
158
|
proc_params=proc_params,
|
|
159
159
|
num_receivers=len(self.receivers),
|
|
160
|
-
topology_kind=self.topology_kind,
|
|
161
160
|
)
|
|
162
161
|
|
|
163
162
|
self.detector.prepare_acq(uuid, ctl, acq, proc)
|
|
@@ -177,13 +176,7 @@ class Client:
|
|
|
177
176
|
|
|
178
177
|
@docstring_from(Detector.start_acq)
|
|
179
178
|
def start_acq(self) -> None:
|
|
180
|
-
|
|
181
|
-
pipeline.register_on_finished(pipeline.unregister_events)
|
|
182
|
-
try:
|
|
183
|
-
self.detector.start_acq()
|
|
184
|
-
except Exception:
|
|
185
|
-
pipeline.unregister_events()
|
|
186
|
-
raise
|
|
179
|
+
self.detector.start_acq()
|
|
187
180
|
|
|
188
181
|
@docstring_from(Detector.trigger)
|
|
189
182
|
def trigger(self) -> None:
|
|
@@ -300,14 +293,9 @@ class Client:
|
|
|
300
293
|
|
|
301
294
|
Raises if the pipeline is absent from a receiver.
|
|
302
295
|
"""
|
|
303
|
-
|
|
304
|
-
# First unregister Tango events
|
|
305
|
-
pipeline = self.__pipelines.pop(uuid, None)
|
|
306
|
-
if pipeline is not None:
|
|
307
|
-
pipeline.unregister_events()
|
|
308
|
-
|
|
309
296
|
for recv in self.receivers:
|
|
310
297
|
recv.erasePipeline(str(uuid))
|
|
298
|
+
self.__pipelines.pop(uuid, None)
|
|
311
299
|
|
|
312
300
|
def clear_previous_pipelines(self) -> None:
|
|
313
301
|
"""Erase all pipelines except the current one."""
|
|
@@ -24,8 +24,6 @@ import logging
|
|
|
24
24
|
import uuid
|
|
25
25
|
from collections.abc import Iterator
|
|
26
26
|
|
|
27
|
-
import gevent
|
|
28
|
-
|
|
29
27
|
import tango
|
|
30
28
|
from beartype import beartype
|
|
31
29
|
from gevent.lock import BoundedSemaphore
|
|
@@ -408,18 +406,12 @@ class Detector:
|
|
|
408
406
|
f"prepare_acq({uuid}, {ctrl_params}, {acq_params}, {proc_params})"
|
|
409
407
|
)
|
|
410
408
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
def validate_ctrl(ctrl):
|
|
417
|
-
validate(
|
|
418
|
-
instance=ctrl_params,
|
|
419
|
-
schema=self.params_schema[ctrl.name()]["acq_params"],
|
|
420
|
-
)
|
|
409
|
+
validate(
|
|
410
|
+
instance=ctrl_params,
|
|
411
|
+
schema=self.params_schema[self.ctrl.name()]["acq_params"],
|
|
412
|
+
)
|
|
421
413
|
|
|
422
|
-
|
|
414
|
+
for i, recv in enumerate(self.__recvs):
|
|
423
415
|
validate(
|
|
424
416
|
instance=acq_params[i],
|
|
425
417
|
schema=self.params_schema[recv.name()]["acq_params"],
|
|
@@ -428,19 +420,13 @@ class Detector:
|
|
|
428
420
|
pipeline_class = pipelines.get_class(proc_params[i]["class_name"])
|
|
429
421
|
validate(instance=proc_params[i], schema=pipeline_class.params_schema)
|
|
430
422
|
|
|
431
|
-
parallel_exec(validate_ctrl, validate_recv)
|
|
432
|
-
|
|
433
423
|
# Update parameters on the device servers
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
def update_recv(i, recv):
|
|
424
|
+
# TODO: Rename acq_params to ctrl_params
|
|
425
|
+
self.__ctrl.acq_params = json.dumps(ctrl_params)
|
|
426
|
+
for i, recv in enumerate(self.__recvs):
|
|
439
427
|
recv.acq_params = json.dumps(acq_params[i])
|
|
440
428
|
recv.proc_params = json.dumps(proc_params[i])
|
|
441
429
|
|
|
442
|
-
parallel_exec(update_ctrl, update_recv)
|
|
443
|
-
|
|
444
430
|
# Raises and reverts to IDLE on exception
|
|
445
431
|
with self._locked_fsm() as fsm:
|
|
446
432
|
fsm.prepare(str(uuid))
|