Smart Scan metadata containing scan name if scan is running
This commit is contained in:
parent
057376a799
commit
c2d8160ff4
1 changed files with 17 additions and 1 deletions
|
|
@ -7,7 +7,16 @@ It also controls external processes for live stitching composite images, and
|
||||||
the creation of the final stitched images.
|
the creation of the final stitched images.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from typing import Optional, Self, TypeVar, ParamSpec, Callable, Concatenate
|
from typing import (
|
||||||
|
Optional,
|
||||||
|
Self,
|
||||||
|
TypeVar,
|
||||||
|
ParamSpec,
|
||||||
|
Callable,
|
||||||
|
Concatenate,
|
||||||
|
Mapping,
|
||||||
|
Any,
|
||||||
|
)
|
||||||
import threading
|
import threading
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
@ -481,6 +490,13 @@ class SmartScanThing(lt.Thing):
|
||||||
**self._scan_data.starting_position, block_cancellation=True
|
**self._scan_data.starting_position, block_cancellation=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def thing_state(self) -> Mapping[str, Any]:
|
||||||
|
"""Return a metadata dict for ongoing scan to populate."""
|
||||||
|
if self._ongoing_scan is None:
|
||||||
|
return {}
|
||||||
|
return {"scan_name": self._ongoing_scan.name}
|
||||||
|
|
||||||
@_scan_running
|
@_scan_running
|
||||||
def _perform_final_stitch(self) -> None:
|
def _perform_final_stitch(self) -> None:
|
||||||
"""Update the scan zip and perform final stitch of the data."""
|
"""Update the scan zip and perform final stitch of the data."""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue