class documentation

A generic workflow for any scan that captures images on a rectilinear grid.

Method all_settings Return scan settings and the stitching settings.
Method check_before_start Before starting a scan, check that camera-stage-mapping is set.
Class Variable autofocus_dz The z distance to perform an autofocus in steps.
Class Variable overlap The fraction that adjacent images should overlap in x and y.
Property ready Whether this scanworkflow is ready to start.
Method _build_scan_settings Construct the _settings_model.
Method _calc_displacement_from_overlap Use camera stage mapping to calculate x and y displacement from given overlap.
Method _get_stitching_settings_model Return a stitching settings model based on current settings.
Class Variable _csm Undocumented

Inherited from ScanWorkflow:

Method acquisition_routine Overload to set the acquisition routine that happens at each scan site.
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.
Method settings_ui Return the UI for the workflow's settings in the scan tab.
Class Variable display_name Undocumented
Class Variable save_resolution A tuple of the image resolution to capture.
Class Variable ui_blurb Undocumented
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 _planner_cls Undocumented
Class Variable _settings_model Undocumented
Class Variable _stage Undocumented
def all_settings(self, images_dir: str) -> tuple[RectGridSettingModelType, StitchingSettings | None]: (source)

Return scan settings and the stitching settings.

Parameters
images_dir:strThe directory that images are to be written to.
Returns
tuple[RectGridSettingModelType, StitchingSettings | None]A tuple containing the settings model for this workflow and the settings model for stitching.
def check_before_start(self, scan_name: str): (source)

Before starting a scan, check that camera-stage-mapping is set.

Raise error if:
  • camera stage mapping is not set
autofocus_dz: int = (source)

The z distance to perform an autofocus in steps.

Must be greater than or equal to 400, and less than or equal to 3000.

Note that 200 steps is the backlash correction size, so the value must be above this. 3000 is a sensible limit for 20x objectives.

overlap: float = (source)

The fraction that adjacent images should overlap in x and y.

This must be between 0.1 and 0.7.

def _calc_displacement_from_overlap(self, overlap: float) -> tuple[int, int]: (source)

Use camera stage mapping to calculate x and y displacement from given overlap.

Parameters
overlap:floatThe desired overlap as a fraction of the image. i.e. 0.5 means that each image should overlap its nearest neighbour by 50%.
Returns
tuple[int, int](dx, dy) - the x and y displacements in steps
Raises
RuntimeErrorIf there is no camera stage mapper Thing available or if CMS isn't calibrated.
def _get_stitching_settings_model(self) -> StitchingSettings: (source)

Return a stitching settings model based on current settings.