module documentation

The core sample scanning functionality for the OpenFlexure Microscope.

SmartScan provides sample scanning functionality. This functionality can be customised by different ScanWorkflow Things which control the path planning and acquisition routines. It manages the directories of past scans via scan_directories. It also controls external processes for live stitching composite images, and the creation of the final stitched images.

Class ActiveScanData A model for the scan data during an ongoing scan.
Class JPEGBlob A class representing a JPEG image as a LabThings FastAPI Blob.
Class ScanListInfo The information to be sent to the Scan List tab.
Class SmartScanThing A Thing for scanning samples and interacting with past scans.
Class ZipBlob A class representing a Zip file as a LabThings FastAPI Blob.
Exception ScanNotRunningError Exception called when scan not running that requires a scan to be running.
Constant P Undocumented
Type Variable T Undocumented
Variable AnyModel Undocumented
Function _scan_running Decorate a method so that it will error if a scan is not running.

Undocumented

Value
ParamSpec('P')

Undocumented

Value
TypeVar('T')
AnyModel = (source)

Undocumented

def _scan_running(method: Callable[Concatenate[SmartScanThing, P], T]) -> Callable[Concatenate[SmartScanThing, P], T]: (source)

Decorate a method so that it will error if a scan is not running.

This decorator is used by all methods in SmartScanThing that are using the variables set for the scan. It will throw a runtime error if self._scan_lock is not locked, as all scan variables are set at the same time and released with the lock