pigeon-tem-comms 1.2.0__tar.gz → 1.3.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 (34) hide show
  1. {pigeon_tem_comms-1.2.0/pigeon_tem_comms.egg-info → pigeon_tem_comms-1.3.0}/PKG-INFO +1 -1
  2. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/__init__.py +9 -1
  3. pigeon_tem_comms-1.3.0/TEM_comms/calibration.py +18 -0
  4. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/ui.py +1 -0
  5. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0/pigeon_tem_comms.egg-info}/PKG-INFO +1 -1
  6. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/pigeon_tem_comms.egg-info/SOURCES.txt +2 -0
  7. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/pyproject.toml +1 -1
  8. pigeon_tem_comms-1.3.0/tests/test_calibration.py +36 -0
  9. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/LICENSE +0 -0
  10. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/README.md +0 -0
  11. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/buffer.py +0 -0
  12. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/camera.py +0 -0
  13. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/montage.py +0 -0
  14. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/qc.py +0 -0
  15. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/roi.py +0 -0
  16. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/scope.py +0 -0
  17. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/stage/__init__.py +0 -0
  18. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/stage/aperture.py +0 -0
  19. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/stage/motion.py +0 -0
  20. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/stage/rotation.py +0 -0
  21. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/tile/__init__.py +0 -0
  22. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/tile/metadata.py +0 -0
  23. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/TEM_comms/tile/statistics.py +0 -0
  24. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/pigeon_tem_comms.egg-info/dependency_links.txt +0 -0
  25. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/pigeon_tem_comms.egg-info/entry_points.txt +0 -0
  26. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/pigeon_tem_comms.egg-info/requires.txt +0 -0
  27. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/pigeon_tem_comms.egg-info/top_level.txt +0 -0
  28. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/setup.cfg +0 -0
  29. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/tests/test_buffer.py +0 -0
  30. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/tests/test_camera.py +0 -0
  31. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/tests/test_qc.py +0 -0
  32. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/tests/test_scope_command.py +0 -0
  33. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.0}/tests/test_stage.py +0 -0
  34. {pigeon_tem_comms-1.2.0 → pigeon_tem_comms-1.3.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.2.0
3
+ Version: 1.3.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,4 +1,9 @@
1
- from . import buffer, camera, montage, qc, roi, scope, stage, tile, ui
1
+ from pigeon import BaseMessage
2
+ from . import buffer, camera, montage, qc, roi, scope, stage, tile, ui, calibration
3
+
4
+
5
+ class State(BaseMessage):
6
+ state: str
2
7
 
3
8
 
4
9
  topics = {
@@ -32,4 +37,7 @@ topics = {
32
37
  "roi.create": roi.CreateROI,
33
38
  "roi.current": roi.ROI,
34
39
  "montage.minimaps": montage.Minimaps,
40
+ "calibration.resolution": calibration.Resolution,
41
+ "calibration.centroid": calibration.Centroid,
42
+ "state": State,
35
43
  }
@@ -0,0 +1,18 @@
1
+ from pigeon import BaseMessage
2
+ from typing import Mapping
3
+
4
+
5
+ class _Resolution(BaseMessage):
6
+ nm_per_px: tuple[float, float]
7
+ rotation: float
8
+
9
+
10
+ class Resolution(BaseMessage):
11
+ lowmag: Mapping[int, _Resolution]
12
+ mag: Mapping[int, _Resolution]
13
+
14
+
15
+ class Centroid(BaseMessage):
16
+ aperture_id: int
17
+ x: int
18
+ y: int
@@ -20,6 +20,7 @@ class Run(BaseMessage):
20
20
  abort_now: bool = False
21
21
  abort_at_end: bool = False
22
22
  resume: bool = False
23
+ cancel: bool = False
23
24
 
24
25
  @model_validator(mode="after")
25
26
  def check_grid(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pigeon-tem-comms
3
- Version: 1.2.0
3
+ Version: 1.3.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
@@ -3,6 +3,7 @@ README.md
3
3
  pyproject.toml
4
4
  TEM_comms/__init__.py
5
5
  TEM_comms/buffer.py
6
+ TEM_comms/calibration.py
6
7
  TEM_comms/camera.py
7
8
  TEM_comms/montage.py
8
9
  TEM_comms/qc.py
@@ -23,6 +24,7 @@ pigeon_tem_comms.egg-info/entry_points.txt
23
24
  pigeon_tem_comms.egg-info/requires.txt
24
25
  pigeon_tem_comms.egg-info/top_level.txt
25
26
  tests/test_buffer.py
27
+ tests/test_calibration.py
26
28
  tests/test_camera.py
27
29
  tests/test_qc.py
28
30
  tests/test_scope_command.py
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pigeon-tem-comms"
3
- version = "1.2.0"
3
+ version = "1.3.0"
4
4
  authors = [
5
5
  { name="Cameron Devine", email="cameron.devine@alleninstitute.org" },
6
6
  ]
@@ -0,0 +1,36 @@
1
+ from TEM_comms.calibration import Resolution
2
+ import pytest
3
+ import json
4
+
5
+
6
+ @pytest.mark.parametrize(
7
+ "data",
8
+ [
9
+ {
10
+ "mag": {},
11
+ "lowmag": {},
12
+ },
13
+ {
14
+ "mag": {},
15
+ "lowmag": {50: {"nm_per_px": (180.4, 170.6), "rotation": 3.14}},
16
+ },
17
+ {
18
+ "mag": {3000: {"nm_per_px": (4.5, 4.7), "rotation": 1.5}},
19
+ "lowmag": {},
20
+ },
21
+ {
22
+ "mag": {3000: {"nm_per_px": (4.5, 4.7), "rotation": 1.5}},
23
+ "lowmag": {50: {"nm_per_px": (180.4, 170.6), "rotation": 3.14}},
24
+ },
25
+ {
26
+ "mag": {
27
+ 3000: {"nm_per_px": (4.5, 4.7), "rotation": 1.5},
28
+ 1500: {"nm_per_px": (7.1, 7.3), "rotation": 2.1},
29
+ },
30
+ "lowmag": {50: {"nm_per_px": (180.4, 170.6), "rotation": 3.14}},
31
+ },
32
+ ],
33
+ )
34
+ def test_calibration(data):
35
+ msg = Resolution(**data)
36
+ assert Resolution.deserialize(msg.serialize()) == msg