pigeon-tem-comms 1.1.3__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.
Files changed (32) hide show
  1. {pigeon_tem_comms-1.1.3/pigeon_tem_comms.egg-info → pigeon_tem_comms-1.2.0}/PKG-INFO +1 -1
  2. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/montage.py +8 -2
  3. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/aperture.py +5 -0
  4. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/motion.py +5 -0
  5. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0/pigeon_tem_comms.egg-info}/PKG-INFO +1 -1
  6. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/SOURCES.txt +1 -0
  7. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/pyproject.toml +1 -1
  8. pigeon_tem_comms-1.2.0/tests/test_stage.py +43 -0
  9. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/LICENSE +0 -0
  10. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/README.md +0 -0
  11. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/__init__.py +0 -0
  12. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/buffer.py +0 -0
  13. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/camera.py +0 -0
  14. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/qc.py +0 -0
  15. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/roi.py +0 -0
  16. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/scope.py +0 -0
  17. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/__init__.py +0 -0
  18. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/stage/rotation.py +0 -0
  19. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/tile/__init__.py +0 -0
  20. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/tile/metadata.py +0 -0
  21. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/tile/statistics.py +0 -0
  22. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/TEM_comms/ui.py +0 -0
  23. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/dependency_links.txt +0 -0
  24. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/entry_points.txt +0 -0
  25. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/requires.txt +0 -0
  26. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/pigeon_tem_comms.egg-info/top_level.txt +0 -0
  27. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/setup.cfg +0 -0
  28. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/tests/test_buffer.py +0 -0
  29. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/tests/test_camera.py +0 -0
  30. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/tests/test_qc.py +0 -0
  31. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/tests/test_scope_command.py +0 -0
  32. {pigeon_tem_comms-1.1.3 → pigeon_tem_comms-1.2.0}/tests/test_ui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pigeon-tem-comms
3
- Version: 1.1.3
3
+ Version: 1.2.0
4
4
  Summary: Pigeon messages for the next generation TEM imaging system.
5
5
  Author-email: Cameron Devine <cameron.devine@alleninstitute.org>
6
6
  License: BSD 3 Clause
@@ -1,11 +1,17 @@
1
1
  from pigeon import BaseMessage
2
- from typing import Mapping, List, Any, Optional, Tuple
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
- tile_ids: List[str]
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pigeon-tem-comms
3
- Version: 1.1.3
3
+ Version: 1.2.0
4
4
  Summary: Pigeon messages for the next generation TEM imaging system.
5
5
  Author-email: Cameron Devine <cameron.devine@alleninstitute.org>
6
6
  License: BSD 3 Clause
@@ -26,4 +26,5 @@ tests/test_buffer.py
26
26
  tests/test_camera.py
27
27
  tests/test_qc.py
28
28
  tests/test_scope_command.py
29
+ tests/test_stage.py
29
30
  tests/test_ui.py
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pigeon-tem-comms"
3
- version = "1.1.3"
3
+ version = "1.2.0"
4
4
  authors = [
5
5
  { name="Cameron Devine", email="cameron.devine@alleninstitute.org" },
6
6
  ]
@@ -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"