pigeon-tem-comms 1.1.2__tar.gz → 1.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-1.1.2/pigeon_tem_comms.egg-info → pigeon_tem_comms-1.2.0}/PKG-INFO +1 -1
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/camera.py +1 -1
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/montage.py +8 -2
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/aperture.py +5 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/motion.py +5 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0/pigeon_tem_comms.egg-info}/PKG-INFO +1 -1
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/SOURCES.txt +1 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/pyproject.toml +1 -1
- pigeon_tem_comms-1.2.0/tests/test_stage.py +43 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/LICENSE +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/README.md +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/__init__.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/buffer.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/qc.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/roi.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/scope.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/__init__.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/rotation.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/tile/__init__.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/tile/metadata.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/tile/statistics.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/TEM_comms/ui.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/dependency_links.txt +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/entry_points.txt +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/requires.txt +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/top_level.txt +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/setup.cfg +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/tests/test_buffer.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/tests/test_camera.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/tests/test_qc.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/tests/test_scope_command.py +0 -0
- {pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/tests/test_ui.py +0 -0
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
from pigeon import BaseMessage
|
|
2
|
-
from typing import Mapping,
|
|
2
|
+
from typing import Mapping, Dict, Any, Optional, Tuple
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
class Tile(BaseMessage):
|
|
7
|
+
raster_index: int
|
|
8
|
+
stage_position: Tuple[int, int]
|
|
9
|
+
raster_position: Tuple[int, int]
|
|
10
|
+
|
|
11
|
+
|
|
6
12
|
class Complete(BaseMessage):
|
|
7
13
|
montage_id: str
|
|
8
|
-
|
|
14
|
+
tiles: Dict[str, Tile]
|
|
9
15
|
acquisition_id: str
|
|
10
16
|
start_time: datetime
|
|
11
17
|
pixel_size: float
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
from pigeon import BaseMessage
|
|
2
|
+
from pydantic import ConfigDict
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class Command(BaseMessage):
|
|
6
|
+
model_config = ConfigDict(extra="allow")
|
|
7
|
+
|
|
5
8
|
aperture_id: int | None = None
|
|
6
9
|
calibrate: bool = False
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class Status(BaseMessage):
|
|
13
|
+
model_config = ConfigDict(extra="allow")
|
|
14
|
+
|
|
10
15
|
current_aperture: int | None
|
|
11
16
|
calibrated: bool
|
|
12
17
|
error: str = ""
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
2
|
from pigeon import BaseMessage
|
|
3
|
+
from pydantic import ConfigDict
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class Command(BaseMessage):
|
|
7
|
+
model_config = ConfigDict(extra="allow")
|
|
8
|
+
|
|
6
9
|
x: int | None = None
|
|
7
10
|
y: int | None = None
|
|
8
11
|
z: Optional[int] = None
|
|
@@ -10,6 +13,8 @@ class Command(BaseMessage):
|
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
class Status(BaseMessage):
|
|
16
|
+
model_config = ConfigDict(extra="allow")
|
|
17
|
+
|
|
13
18
|
x: int | None
|
|
14
19
|
y: int | None
|
|
15
20
|
z: Optional[int] = None
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from TEM_comms.stage.motion import Command as MotionCommand, Status as MotionStatus
|
|
2
|
+
from TEM_comms.stage.aperture import (
|
|
3
|
+
Command as ApertureCommand,
|
|
4
|
+
Status as ApertureStatus,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_motion_command_with_extra_fields():
|
|
9
|
+
command = MotionCommand(x=10, y=20, z=30, calibrate=True, wait_for_settle=True)
|
|
10
|
+
assert command.x == 10
|
|
11
|
+
assert command.y == 20
|
|
12
|
+
assert command.z == 30
|
|
13
|
+
assert command.calibrate is True
|
|
14
|
+
assert command.wait_for_settle is True
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def test_motion_status_with_extra_fields():
|
|
18
|
+
status = MotionStatus(
|
|
19
|
+
x=10, y=20, z=30, in_motion=True, error="", extra_field="extra_value"
|
|
20
|
+
)
|
|
21
|
+
assert status.x == 10
|
|
22
|
+
assert status.y == 20
|
|
23
|
+
assert status.z == 30
|
|
24
|
+
assert status.in_motion is True
|
|
25
|
+
assert status.error == ""
|
|
26
|
+
assert status.extra_field == "extra_value"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_aperture_command_with_extra_fields():
|
|
30
|
+
command = ApertureCommand(aperture_id=1, calibrate=True, extra_field="extra_value")
|
|
31
|
+
assert command.aperture_id == 1
|
|
32
|
+
assert command.calibrate is True
|
|
33
|
+
assert command.extra_field == "extra_value"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_aperture_status_with_extra_fields():
|
|
37
|
+
status = ApertureStatus(
|
|
38
|
+
current_aperture=1, calibrated=True, error="", extra_field="extra_value"
|
|
39
|
+
)
|
|
40
|
+
assert status.current_aperture == 1
|
|
41
|
+
assert status.calibrated is True
|
|
42
|
+
assert status.error == ""
|
|
43
|
+
assert status.extra_field == "extra_value"
|
|
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
|
{pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pigeon_tem_comms-1.1.2 → pigeon_tem_comms-1.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|