class documentation

A base class for all Scanworkflows.

Scan workflows set the behaviour of a scan, including the background detection, scan planning, acquisition routine.

Method acquisition_routine Overload to set the acquisition routine that happens at each scan site.
Method all_settings Return the scan settings and the stitching settings.
Method check_before_start Check before the scan starts. Throw an error if the scan shouldn't start.
Method new_scan_planner Return the a new scan planner object for a scan.
Method pre_scan_routine Overload to set the routine that happens before each scan.
Class Variable display_name Undocumented
Class Variable save_resolution A tuple of the image resolution to capture.
Class Variable ui_blurb Undocumented
Property ready Whether this scanworkflow is ready to start.
Property settings_ui A list of PropertyControl objects to create the settings in the scan tab.
Method _autofocus_and_capture Autofocus and then capture, this can be used as an acquisition routine.
Class Variable _autofocus Undocumented
Class Variable _cam Undocumented
Class Variable _csm Undocumented
Class Variable _planner_cls Undocumented
Class Variable _settings_model Undocumented
Class Variable _stage Undocumented
def acquisition_routine(self, settings: SettingModelType, xyz_pos: tuple[int, int, int]) -> tuple[bool, int | None]: (source)

Overload to set the acquisition routine that happens at each scan site.

Parameters
settings:SettingModelTypeThe settings for this scan, which should be a SettingModelType
xyz_pos:tuple[int, int, int]The current position as a tuple or 3 ints.
Returns
tuple[bool, int | None]A tuple of whether an image was taken, and the z-position for focus. If failed to find focus, returns for the focus z-position.
def all_settings(self, images_dir: str) -> tuple[SettingModelType, StitchingSettings | None]: (source)

Return the scan settings and the stitching settings.

  • The specific settings for this scan workflow are returned as a Base Model of
    the type set when defining the class.
  • Stitiching settings are returned either as a StitchingSettings object or None
    is returned if it is not possible to stitch the scan.
def check_before_start(self, scan_name: str): (source)

Check before the scan starts. Throw an error if the scan shouldn't start.

The scan_name is passed to this function to enable workflows to validate the scan name if needed.

def new_scan_planner(self, settings: SettingModelType, position: Mapping[str, int]) -> ScanPlanner: (source)
save_resolution: tuple[int, int] = (source)

A tuple of the image resolution to capture.

@lt.property
ready: bool = (source)

Whether this scanworkflow is ready to start.

@lt.property
settings_ui: list[PropertyControl] = (source)
def _autofocus_and_capture(self, xyz_pos: tuple[int, int, int], dz: int, images_dir: str, save_resolution: tuple[int, int]) -> tuple[bool, int | None]: (source)

Autofocus and then capture, this can be used as an acquisition routine.

Parameters
xyz_pos:tuple[int, int, int]Undocumented
dz:intThe dz for autofocus.
images_dir:strThe path to the directory for saving images..
save_resolution:tuple[int, int]The resolution to save images at.
Returns
tuple[bool, int | None]A tuple ready to pass out of acquisition routine. In this method, image is always taken, so first return is True.

Undocumented

Undocumented

_planner_cls: type[ScanPlanner] = (source)

Undocumented

_settings_model: type[SettingModelType] = (source)

Undocumented

Undocumented