pigeon-tem-comms 0.1.1__tar.gz → 0.2.0__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.
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/PKG-INFO +1 -1
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/__init__.py +5 -1
- pigeon_tem_comms-0.2.0/TEM_comms/ui.py +42 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/PKG-INFO +1 -1
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/SOURCES.txt +3 -1
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pyproject.toml +1 -1
- pigeon_tem_comms-0.2.0/tests/test_ui.py +18 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/LICENSE +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/README.md +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/buffer.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/camera.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/scope.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/__init__.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/aperture.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/motion.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/stage/rotation.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/tile/__init__.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/TEM_comms/tile/statistics.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/dependency_links.txt +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/entry_points.txt +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/requires.txt +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/top_level.txt +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/setup.cfg +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/tests/test_buffer.py +0 -0
- {pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/tests/test_scope_command.py +0 -0
|
@@ -3,6 +3,7 @@ from . import camera
|
|
|
3
3
|
from . import scope
|
|
4
4
|
from . import stage
|
|
5
5
|
from . import tile
|
|
6
|
+
from . import ui
|
|
6
7
|
|
|
7
8
|
import importlib.metadata
|
|
8
9
|
|
|
@@ -31,7 +32,10 @@ topics = {
|
|
|
31
32
|
"tile.statistics.histogram": tile.statistics.Histogram,
|
|
32
33
|
"tile.statistics.min_max_mean": tile.statistics.MinMaxMean,
|
|
33
34
|
"tile.transform": tile.Transform,
|
|
35
|
+
"ui.edit": ui.Edit,
|
|
36
|
+
"ui.run": ui.Run,
|
|
37
|
+
"ui.setup": ui.Setup,
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
|
|
37
|
-
msgs = (topics, __version__)
|
|
41
|
+
msgs = (topics, __version__)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from pigeon import BaseMessage
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from pydantic import model_validator
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Edit(BaseMessage):
|
|
7
|
+
roi_id: str
|
|
8
|
+
roi_pos_x: int
|
|
9
|
+
roi_pox_y: int
|
|
10
|
+
roi_width: int
|
|
11
|
+
roi_height: int
|
|
12
|
+
roi_angle: float
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Run(BaseMessage):
|
|
16
|
+
session_id: Optional[str] = None
|
|
17
|
+
grid_first: Optional[int] = None
|
|
18
|
+
grid_last: Optional[int] = None
|
|
19
|
+
montage: bool = False
|
|
20
|
+
abort_now: bool = False
|
|
21
|
+
abort_at_end: bool = False
|
|
22
|
+
resume: bool = False
|
|
23
|
+
|
|
24
|
+
@model_validator(mode="after")
|
|
25
|
+
def check_grid(self):
|
|
26
|
+
assert self.montage != (self.grid_first is None)
|
|
27
|
+
assert self.montage != (self.grid_last is None)
|
|
28
|
+
return self
|
|
29
|
+
|
|
30
|
+
@model_validator(mode="after")
|
|
31
|
+
def check_session(self):
|
|
32
|
+
assert self.montage != (self.session_id is None)
|
|
33
|
+
return self
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class Setup(BaseMessage):
|
|
37
|
+
conch_owner: Optional[str] = None
|
|
38
|
+
auto_focus: bool = False
|
|
39
|
+
auto_exposure: bool = False
|
|
40
|
+
lens_correction: bool = False
|
|
41
|
+
acquire_brightfield: bool = False
|
|
42
|
+
acquire_darkfield: bool = False
|
|
@@ -5,6 +5,7 @@ TEM_comms/__init__.py
|
|
|
5
5
|
TEM_comms/buffer.py
|
|
6
6
|
TEM_comms/camera.py
|
|
7
7
|
TEM_comms/scope.py
|
|
8
|
+
TEM_comms/ui.py
|
|
8
9
|
TEM_comms/stage/__init__.py
|
|
9
10
|
TEM_comms/stage/aperture.py
|
|
10
11
|
TEM_comms/stage/motion.py
|
|
@@ -18,4 +19,5 @@ pigeon_tem_comms.egg-info/entry_points.txt
|
|
|
18
19
|
pigeon_tem_comms.egg-info/requires.txt
|
|
19
20
|
pigeon_tem_comms.egg-info/top_level.txt
|
|
20
21
|
tests/test_buffer.py
|
|
21
|
-
tests/test_scope_command.py
|
|
22
|
+
tests/test_scope_command.py
|
|
23
|
+
tests/test_ui.py
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from TEM_comms.ui import Run
|
|
2
|
+
from pydantic import ValidationError
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_run():
|
|
7
|
+
with pytest.raises(ValidationError):
|
|
8
|
+
Run(montage=True, session_id="test", grid_first=1)
|
|
9
|
+
|
|
10
|
+
with pytest.raises(ValidationError):
|
|
11
|
+
Run(montage=True, session_id="test", grid_last=2)
|
|
12
|
+
|
|
13
|
+
with pytest.raises(ValidationError):
|
|
14
|
+
Run(montage=True, grid_first=1, grid_last=2)
|
|
15
|
+
|
|
16
|
+
Run(montage=True, session_id="test", grid_first=1, grid_last=2)
|
|
17
|
+
msg = Run()
|
|
18
|
+
assert not msg.montage
|
|
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
|
{pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pigeon_tem_comms-0.1.1 → pigeon_tem_comms-0.2.0}/pigeon_tem_comms.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|