lima2.client 3.0.0__tar.gz → 3.0a1__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.0a1}/PKG-INFO +1 -1
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/pipeline.py +16 -16
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/topology.py +6 -11
- {lima2_client-3.0.0 → lima2_client-3.0a1/src/lima2_client.egg-info}/PKG-INFO +1 -1
- {lima2_client-3.0.0 → lima2_client-3.0a1}/LICENSE +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/README.md +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/pyproject.toml +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/setup.cfg +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/draw_state_diagram.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/async_github_pull_request.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/async_turnstile.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/boolean_field.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/github_pull_request.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/turnstile.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/exceptions.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/state_machine.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/client.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/convert.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/detector.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/devencoded/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/devencoded/dense_frame.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/devencoded/exception.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/devencoded/smx_sparse_frame.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/devencoded/sparse_frame.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/devencoded/structured_array.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/pipelines/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/pipelines/failing.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/pipelines/legacy.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/pipelines/smx.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/pipelines/xpcs.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/progress_counter.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/py.typed +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/shell.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/state_machine.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/client/utils.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/master_file/generate.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/server/__init__.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/server/control.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/server/receiver.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2/server/timer.py +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2_client.egg-info/SOURCES.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2_client.egg-info/dependency_links.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2_client.egg-info/entry_points.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2_client.egg-info/requires.txt +0 -0
- {lima2_client-3.0.0 → lima2_client-3.0a1}/src/lima2_client.egg-info/top_level.txt +0 -0
|
@@ -379,13 +379,13 @@ class Pipeline:
|
|
|
379
379
|
|
|
380
380
|
# Pop stats for new frames from each receiver and concatenate, mixing in cached data.
|
|
381
381
|
# Data comes from server as 1D array with size (num_frames * num_rois)
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
382
|
+
new_data = np.concatenate(
|
|
383
|
+
[cache.flatten()]
|
|
384
|
+
+ [
|
|
385
|
+
structured_array.decode(dev.popRoiStatistics(), dtype)
|
|
386
|
+
for dev in self._devs
|
|
387
|
+
]
|
|
388
|
+
)
|
|
389
389
|
|
|
390
390
|
# Guess number of frames from the data
|
|
391
391
|
num_frames = np.unique(new_data["frame_idx"]).size
|
|
@@ -473,13 +473,13 @@ class Pipeline:
|
|
|
473
473
|
|
|
474
474
|
# Pop profiles for new frames from each receiver and concatenate, mixing in cached data.
|
|
475
475
|
# Data comes from server as 1D array with size (num_frames * sum(roi_lengths))
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
476
|
+
new_data = np.concatenate(
|
|
477
|
+
[cache.flatten()]
|
|
478
|
+
+ [
|
|
479
|
+
structured_array.decode(dev.popRoiProfiles(), dtype)
|
|
480
|
+
for dev in self._devs
|
|
481
|
+
]
|
|
482
|
+
)
|
|
483
483
|
|
|
484
484
|
# Reshape into (num_frames, sum(roi_lengths))
|
|
485
485
|
new_data = new_data.reshape((-1, sum(roi_lengths)))
|
|
@@ -654,9 +654,9 @@ class Pipeline:
|
|
|
654
654
|
"no associated label"
|
|
655
655
|
)
|
|
656
656
|
|
|
657
|
-
def last_frames(rcv_idx
|
|
657
|
+
def last_frames(rcv_idx):
|
|
658
658
|
last_frames_str = self._devs[rcv_idx].last_frames
|
|
659
|
-
return
|
|
659
|
+
return json.loads(last_frames_str)[f"{source.label}_idx"]
|
|
660
660
|
|
|
661
661
|
num_rcvs = len(self._devs)
|
|
662
662
|
with ThreadPoolExecutor(max_workers=num_rcvs) as pool:
|
|
@@ -9,7 +9,6 @@ import copy
|
|
|
9
9
|
from abc import ABC, abstractmethod
|
|
10
10
|
from collections.abc import Callable
|
|
11
11
|
from enum import Enum
|
|
12
|
-
from concurrent.futures import ThreadPoolExecutor
|
|
13
12
|
|
|
14
13
|
import tango as tg
|
|
15
14
|
from beartype import beartype
|
|
@@ -108,22 +107,18 @@ class UnevenTopology(Topology):
|
|
|
108
107
|
If the frame is found on multiple devices (e.g. frame_idx=-1),
|
|
109
108
|
return the one found last (not necessarily the most recent).
|
|
110
109
|
"""
|
|
110
|
+
frame: EncodedFrame | None = None
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
for i in range(self.num_receivers):
|
|
113
113
|
try:
|
|
114
|
-
frame
|
|
115
|
-
return frame
|
|
114
|
+
frame = getters[i](frame_idx)
|
|
116
115
|
except tg.DevFailed:
|
|
117
|
-
|
|
116
|
+
pass
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
with ThreadPoolExecutor(max_workers=num_rcvs) as pool:
|
|
121
|
-
frames = [f for f in pool.map(get_frame, range(num_rcvs)) if f is not None]
|
|
122
|
-
|
|
123
|
-
if len(frames) == 0:
|
|
118
|
+
if frame is None:
|
|
124
119
|
raise IndexError(f"Frame {frame_idx} not available from any receiver")
|
|
125
120
|
|
|
126
|
-
return
|
|
121
|
+
return frame
|
|
127
122
|
|
|
128
123
|
|
|
129
124
|
def distribute_acq(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/async_turnstile.py
RENAMED
|
File without changes
|
{lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/boolean_field.py
RENAMED
|
File without changes
|
{lima2_client-3.0.0 → lima2_client-3.0a1}/src/finite_state_machine/examples/github_pull_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|