ephys-link 2.1.0b0__py3-none-any.whl → 2.1.0b1__py3-none-any.whl
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.
- ephys_link/__about__.py +1 -1
- ephys_link/bindings/ump_binding.py +13 -17
- {ephys_link-2.1.0b0.dist-info → ephys_link-2.1.0b1.dist-info}/METADATA +1 -1
- {ephys_link-2.1.0b0.dist-info → ephys_link-2.1.0b1.dist-info}/RECORD +7 -7
- {ephys_link-2.1.0b0.dist-info → ephys_link-2.1.0b1.dist-info}/WHEEL +0 -0
- {ephys_link-2.1.0b0.dist-info → ephys_link-2.1.0b1.dist-info}/entry_points.txt +0 -0
- {ephys_link-2.1.0b0.dist-info → ephys_link-2.1.0b1.dist-info}/licenses/LICENSE +0 -0
ephys_link/__about__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.1.
|
|
1
|
+
__version__ = "2.1.0b1"
|
|
@@ -34,20 +34,9 @@ class UmpBinding(BaseBinding):
|
|
|
34
34
|
UMP.set_library_path(RESOURCES_DIRECTORY)
|
|
35
35
|
self._ump: UMP = UMP.get_ump() # pyright: ignore [reportUnknownMemberType]
|
|
36
36
|
|
|
37
|
-
#
|
|
38
|
-
device_ids
|
|
39
|
-
if len(device_ids) == 0
|
|
40
|
-
msg = "No manipulators connected."
|
|
41
|
-
raise RuntimeError(msg)
|
|
42
|
-
|
|
43
|
-
# Currently only supports using uMp-4 XOR uMp-3. Exit if both are connected.
|
|
44
|
-
|
|
45
|
-
# Use the first device as the reference for the number of axes.
|
|
46
|
-
self.num_axes: int = self._get_device(device_ids[0]).n_axes()
|
|
47
|
-
|
|
48
|
-
if any(self._get_device(device_id).n_axes() != self.num_axes for device_id in device_ids): # pyright: ignore [reportUnknownArgumentType, reportUnknownMemberType]
|
|
49
|
-
msg = "uMp-4 and uMp-3 cannot be used at the same time."
|
|
50
|
-
raise RuntimeError(msg)
|
|
37
|
+
# Compute axis count, assumed as the first device. 0 if no devices are connected.
|
|
38
|
+
device_ids = list(map(str, self._ump.list_devices()))
|
|
39
|
+
self.axis_count: int = 0 if len(device_ids) == 0 else self._get_device(device_ids[0]).n_axes()
|
|
51
40
|
|
|
52
41
|
@staticmethod
|
|
53
42
|
@override
|
|
@@ -61,11 +50,18 @@ class UmpBinding(BaseBinding):
|
|
|
61
50
|
|
|
62
51
|
@override
|
|
63
52
|
async def get_manipulators(self) -> list[str]:
|
|
64
|
-
|
|
53
|
+
device_ids = list(map(str, self._ump.list_devices()))
|
|
54
|
+
|
|
55
|
+
# Currently only supports using uMp-4 XOR uMp-3. Throw error if both are connected.
|
|
56
|
+
if any(self._get_device(device_id).n_axes() != self.axis_count for device_id in device_ids): # pyright: ignore [reportUnknownArgumentType]
|
|
57
|
+
msg = "uMp-4 and uMp-3 cannot be used at the same time."
|
|
58
|
+
raise RuntimeError(msg)
|
|
59
|
+
|
|
60
|
+
return device_ids
|
|
65
61
|
|
|
66
62
|
@override
|
|
67
63
|
async def get_axes_count(self) -> int:
|
|
68
|
-
return self.
|
|
64
|
+
return self.axis_count
|
|
69
65
|
|
|
70
66
|
@override
|
|
71
67
|
def get_dimensions(self) -> Vector4:
|
|
@@ -236,4 +232,4 @@ class UmpBinding(BaseBinding):
|
|
|
236
232
|
Returns:
|
|
237
233
|
True if the device is uMp-3, False otherwise.
|
|
238
234
|
"""
|
|
239
|
-
return self.
|
|
235
|
+
return self.axis_count == self.UMP_3_NUM_AXES
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ephys-link
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.0b1
|
|
4
4
|
Summary: A Python Socket.IO server that allows any Socket.IO-compliant application to communicate with manipulators used in electrophysiology experiments.
|
|
5
5
|
Project-URL: Documentation, https://virtualbrainlab.org/ephys_link/installation_and_use.html
|
|
6
6
|
Project-URL: Issues, https://github.com/VirtualBrainLab/ephys-link/issues
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
ephys_link/__about__.py,sha256=
|
|
1
|
+
ephys_link/__about__.py,sha256=ioFei0HyRaKlvpUBHHnq0pLx8kyDkQUelt4_vkwvk20,24
|
|
2
2
|
ephys_link/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
ephys_link/__main__.py,sha256=sbFdC6KJjTfXDgRraU_fmGRPcF4I1Ur9PRDiD86dkRI,1449
|
|
4
4
|
ephys_link/back_end/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -7,7 +7,7 @@ ephys_link/back_end/server.py,sha256=mb3K3pXSO-gHaSj1CGJ0v3CSOW5YCi-p0EOKoySRzKQ
|
|
|
7
7
|
ephys_link/bindings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
ephys_link/bindings/fake_binding.py,sha256=PI7zYv-SjWsGFEs_FVu5Z5l9gykIqG3C7pQISdbwdoY,2357
|
|
9
9
|
ephys_link/bindings/mpm_binding.py,sha256=vn7IKqdiZ6_MX91zomqDXX08ONHwVVgWncRuJTxJpOM,10872
|
|
10
|
-
ephys_link/bindings/ump_binding.py,sha256
|
|
10
|
+
ephys_link/bindings/ump_binding.py,sha256=HeFMA_6P9WqZDy_hVRGWmwEDmDoMlt8w8xCWHIc6S-o,7974
|
|
11
11
|
ephys_link/front_end/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
ephys_link/front_end/cli.py,sha256=isIJs_sZbz7VbNvLgi-HyDlE-TyKD12auDhMTxAkWQU,3099
|
|
13
13
|
ephys_link/front_end/gui.py,sha256=MDcrTS_Xz9bopAgamh4HknqRC10W8E6eOS3Kss_2ZKQ,6864
|
|
@@ -18,8 +18,8 @@ ephys_link/utils/console.py,sha256=52SYvXv_7Fx8QDL3RMFQoggQ1n5W93Yu5aU7uuJQgfg,3
|
|
|
18
18
|
ephys_link/utils/constants.py,sha256=1aML7zBNTM5onVSf6NDrYIR33VJy-dIHd1lFORVBGbM,725
|
|
19
19
|
ephys_link/utils/converters.py,sha256=ZdVmIX-LHCwM__F0SpjN_mfNGGetr1U97xvHd0hf8T0,2038
|
|
20
20
|
ephys_link/utils/startup.py,sha256=jZVed78tuWjUuZqWVgii_zumDr87T-ikEtOFa6KTE_E,2500
|
|
21
|
-
ephys_link-2.1.
|
|
22
|
-
ephys_link-2.1.
|
|
23
|
-
ephys_link-2.1.
|
|
24
|
-
ephys_link-2.1.
|
|
25
|
-
ephys_link-2.1.
|
|
21
|
+
ephys_link-2.1.0b1.dist-info/METADATA,sha256=XE_kTRieGoQRBR5j1zvrl9QcmPdazuCRqUIrLG6K7eI,4609
|
|
22
|
+
ephys_link-2.1.0b1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
23
|
+
ephys_link-2.1.0b1.dist-info/entry_points.txt,sha256=o8wV3AdnJ9o47vg9ymKxPNVq9pMdPq8UZHE_iyAJx-k,124
|
|
24
|
+
ephys_link-2.1.0b1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
25
|
+
ephys_link-2.1.0b1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|