pigeon-tem-comms 1.3.1__tar.gz → 1.4.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.3.1/pigeon_tem_comms.egg-info → pigeon_tem_comms-1.4.0}/PKG-INFO +1 -1
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/__init__.py +2 -1
- pigeon_tem_comms-1.4.0/TEM_comms/roi.py +64 -0
- pigeon_tem_comms-1.4.0/TEM_comms/tile/__init__.py +42 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0/pigeon_tem_comms.egg-info}/PKG-INFO +1 -1
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/pigeon_tem_comms.egg-info/SOURCES.txt +1 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/pyproject.toml +1 -1
- pigeon_tem_comms-1.4.0/tests/test_tile.py +56 -0
- pigeon_tem_comms-1.3.1/TEM_comms/roi.py +0 -45
- pigeon_tem_comms-1.3.1/TEM_comms/tile/__init__.py +0 -24
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/LICENSE +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/README.md +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/buffer.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/calibration.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/camera.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/montage.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/qc.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/scope.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/stage/__init__.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/stage/aperture.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/stage/motion.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/stage/rotation.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/tile/metadata.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/tile/statistics.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/TEM_comms/ui.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/pigeon_tem_comms.egg-info/dependency_links.txt +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/pigeon_tem_comms.egg-info/entry_points.txt +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/pigeon_tem_comms.egg-info/requires.txt +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/pigeon_tem_comms.egg-info/top_level.txt +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/setup.cfg +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/tests/test_buffer.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/tests/test_calibration.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/tests/test_camera.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/tests/test_qc.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/tests/test_scope_command.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/tests/test_stage.py +0 -0
- {pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/tests/test_ui.py +0 -0
|
@@ -27,7 +27,7 @@ topics = {
|
|
|
27
27
|
"tile.statistics.focus": tile.statistics.Focus,
|
|
28
28
|
"tile.statistics.histogram": tile.statistics.Histogram,
|
|
29
29
|
"tile.statistics.min_max_mean": tile.statistics.MinMaxMean,
|
|
30
|
-
"tile.
|
|
30
|
+
"tile.matches": tile.Matches,
|
|
31
31
|
"ui.edit": ui.Edit,
|
|
32
32
|
"ui.run": ui.Run,
|
|
33
33
|
"ui.setup": ui.Setup,
|
|
@@ -36,6 +36,7 @@ topics = {
|
|
|
36
36
|
"roi.load": roi.LoadROI,
|
|
37
37
|
"roi.create": roi.CreateROI,
|
|
38
38
|
"roi.current": roi.ROI,
|
|
39
|
+
"roi.status": roi.ROIStatus,
|
|
39
40
|
"montage.minimaps": montage.Minimaps,
|
|
40
41
|
"calibration.resolution": calibration.Resolution,
|
|
41
42
|
"calibration.centroid": calibration.Centroid,
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
from pigeon import BaseMessage
|
|
2
|
+
from typing import List, Tuple, Optional
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Vertex(BaseMessage):
|
|
7
|
+
x: float
|
|
8
|
+
y: float
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ROI(BaseMessage):
|
|
12
|
+
vertices: List[Vertex]
|
|
13
|
+
rotation_angle: float
|
|
14
|
+
buffer_size: float = 0.0
|
|
15
|
+
montage_id: str
|
|
16
|
+
specimen_id: Optional[str] = None
|
|
17
|
+
grid_id: Optional[str] = None
|
|
18
|
+
section_id: Optional[str] = None
|
|
19
|
+
metadata: Optional[dict] = None
|
|
20
|
+
queue_position: Optional[int] = Field(
|
|
21
|
+
None, description="Position in queue, None means set as current"
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class LoadROI(BaseMessage):
|
|
26
|
+
specimen_id: str
|
|
27
|
+
section_id: str
|
|
28
|
+
grid_id: Optional[str] = None
|
|
29
|
+
queue_position: Optional[int] = Field(
|
|
30
|
+
None, description="Position in queue, None means set as current"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class CreateROI(ROI):
|
|
35
|
+
center: Optional[Vertex] = None
|
|
36
|
+
tilt_angles: Optional[List[float]] = Field(
|
|
37
|
+
default=[0.0],
|
|
38
|
+
description="List of tilt angles in degrees for tomography series",
|
|
39
|
+
)
|
|
40
|
+
aperture_centroid_pixel: Optional[Vertex] = Field(
|
|
41
|
+
None, description="Aperture centroid in pixel coordinates"
|
|
42
|
+
)
|
|
43
|
+
aperture_centroid_physical: Optional[Vertex] = Field(
|
|
44
|
+
None, description="Aperture centroid in physical coordinates (nm)"
|
|
45
|
+
)
|
|
46
|
+
overview_nm_per_pixel: Optional[float] = Field(
|
|
47
|
+
None, description="Overview image scale in nm per pixel"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class ROIStatus(BaseMessage):
|
|
52
|
+
type: str = Field(
|
|
53
|
+
description="Event type: roi_added, roi_advanced, queue_cleared, queue_empty"
|
|
54
|
+
)
|
|
55
|
+
timestamp: int = Field(description="Timestamp")
|
|
56
|
+
roi_count: int = Field(description="Total number of active ROIs (queue + current)")
|
|
57
|
+
has_active_rois: bool = Field(description="Whether there are any ROIs available")
|
|
58
|
+
source: Optional[str] = Field(
|
|
59
|
+
None, description="Source of last ROI submission: UI or external"
|
|
60
|
+
)
|
|
61
|
+
montage_id: Optional[str] = Field(None, description="Current montage ID")
|
|
62
|
+
queue_info: Optional[dict] = Field(
|
|
63
|
+
None, description="Queue statistics: total, completed, remaining"
|
|
64
|
+
)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from .metadata import TileMetadata
|
|
2
|
+
from . import statistics
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
from typing import Literal, List
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Preview(TileMetadata):
|
|
8
|
+
image: str
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Mini(TileMetadata):
|
|
12
|
+
image: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Raw(TileMetadata):
|
|
16
|
+
path: str
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Match(BaseModel):
|
|
20
|
+
model_config = {"extra": "forbid"}
|
|
21
|
+
row: int
|
|
22
|
+
column: int
|
|
23
|
+
dX: float
|
|
24
|
+
dY: float
|
|
25
|
+
dXsd: float
|
|
26
|
+
dYsd: float
|
|
27
|
+
distance: float
|
|
28
|
+
rotation: float
|
|
29
|
+
match_quality: float
|
|
30
|
+
position: Literal["top", "bottom", "left", "right"]
|
|
31
|
+
pX: List[int]
|
|
32
|
+
pY: List[int]
|
|
33
|
+
qX: List[int]
|
|
34
|
+
qY: List[int]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Matches(TileMetadata):
|
|
38
|
+
matches: List[Match]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Processed(TileMetadata):
|
|
42
|
+
path: str
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from TEM_comms.tile import Matches
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_matches_empty():
|
|
5
|
+
matches = Matches(
|
|
6
|
+
row=2,
|
|
7
|
+
column=5,
|
|
8
|
+
overlap=128,
|
|
9
|
+
tile_id="a_tile_id",
|
|
10
|
+
montage_id="a_montage_id",
|
|
11
|
+
matches=(),
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_matches():
|
|
16
|
+
matches = Matches(
|
|
17
|
+
row=2,
|
|
18
|
+
column=5,
|
|
19
|
+
overlap=128,
|
|
20
|
+
tile_id="a_tile_id",
|
|
21
|
+
montage_id="a_montage_id",
|
|
22
|
+
matches=(
|
|
23
|
+
{
|
|
24
|
+
"row": 3,
|
|
25
|
+
"column": 5,
|
|
26
|
+
"dX": 24.3,
|
|
27
|
+
"dY": 37.8,
|
|
28
|
+
"distance": 55.7,
|
|
29
|
+
"rotation": 0.1,
|
|
30
|
+
"position": "bottom",
|
|
31
|
+
"match_quality": 0.5,
|
|
32
|
+
"dXsd": 0.47,
|
|
33
|
+
"dYsd": 0.35,
|
|
34
|
+
"pX": [1, 2, 3, 4],
|
|
35
|
+
"pY": [5, 6, 7, 8],
|
|
36
|
+
"qX": [9, 10, 11, 12],
|
|
37
|
+
"qY": [13, 14, 15, 16],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"row": 2,
|
|
41
|
+
"column": 6,
|
|
42
|
+
"dX": 14.9,
|
|
43
|
+
"dY": 32.3,
|
|
44
|
+
"distance": 42.1,
|
|
45
|
+
"rotation": -0.04,
|
|
46
|
+
"position": "right",
|
|
47
|
+
"match_quality": 0.59,
|
|
48
|
+
"dXsd": 0.59,
|
|
49
|
+
"dYsd": 0.21,
|
|
50
|
+
"pX": [4, 3, 2, 1],
|
|
51
|
+
"pY": [8, 7, 6, 5],
|
|
52
|
+
"qX": [12, 11, 10, 9],
|
|
53
|
+
"qY": [16, 15, 14, 13],
|
|
54
|
+
},
|
|
55
|
+
),
|
|
56
|
+
)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
from pigeon import BaseMessage
|
|
2
|
-
from typing import List, Tuple, Optional
|
|
3
|
-
from pydantic import Field
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Vertex(BaseMessage):
|
|
7
|
-
x: float
|
|
8
|
-
y: float
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class ROI(BaseMessage):
|
|
12
|
-
vertices: List[Vertex]
|
|
13
|
-
rotation_angle: float
|
|
14
|
-
buffer_size: float = 0.0
|
|
15
|
-
montage_id: str
|
|
16
|
-
specimen_id: Optional[str] = None
|
|
17
|
-
grid_id: Optional[str] = None
|
|
18
|
-
section_id: Optional[str] = None
|
|
19
|
-
metadata: Optional[dict] = None
|
|
20
|
-
queue_position: Optional[int] = Field(
|
|
21
|
-
None, description="Position in queue, None means set as current"
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class LoadROI(BaseMessage):
|
|
26
|
-
specimen_id: str
|
|
27
|
-
section_id: str
|
|
28
|
-
grid_id: Optional[str] = None
|
|
29
|
-
queue_position: Optional[int] = Field(
|
|
30
|
-
None, description="Position in queue, None means set as current"
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class CreateROI(BaseMessage):
|
|
35
|
-
center: Vertex
|
|
36
|
-
width: float
|
|
37
|
-
height: float
|
|
38
|
-
rotation_angle: float = 0.0
|
|
39
|
-
montage_id: str
|
|
40
|
-
specimen_id: Optional[str] = None
|
|
41
|
-
grid_id: Optional[str] = None
|
|
42
|
-
section_id: Optional[str] = None
|
|
43
|
-
queue_position: Optional[int] = Field(
|
|
44
|
-
None, description="Position in queue, None means set as current"
|
|
45
|
-
)
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from .metadata import TileMetadata
|
|
2
|
-
from . import statistics
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Preview(TileMetadata):
|
|
6
|
-
image: str
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Mini(TileMetadata):
|
|
10
|
-
image: str
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class Raw(TileMetadata):
|
|
14
|
-
path: str
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class Transform(TileMetadata):
|
|
18
|
-
rotation: float
|
|
19
|
-
x: float
|
|
20
|
-
y: float
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class Processed(TileMetadata):
|
|
24
|
-
path: str
|
|
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
|
|
File without changes
|
|
File without changes
|
{pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.0}/pigeon_tem_comms.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pigeon_tem_comms-1.3.1 → pigeon_tem_comms-1.4.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
|
|
File without changes
|
|
File without changes
|