class documentation
class RegularGridWorkflow(RectGridWorkflow[
Known subclasses: openflexure_microscope_server.things.scan_workflows.RasterWorkflow, openflexure_microscope_server.things.scan_workflows.SnakeWorkflow
A base workflow for any workflow that uses a regular rectangular grid.
| Method | acquisition |
Autofocus and capture. |
| Method | all |
Return the workflow and stitching settings. |
| Method | new |
Return a new scan planner object. |
| Method | pre |
Perform these steps before starting the scan. |
| Class Variable | x |
The number of columns in the scan. |
| Class Variable | y |
The number of rows in the scan. |
| Property | settings |
A list of PropertyControl objects to create the settings in the scan tab. |
| Class Variable | _grid |
Undocumented |
Inherited from RectGridWorkflow:
| Method | check |
Before starting a scan, check that camera-stage-mapping is set. |
| Class Variable | autofocus |
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 | _calc |
Use camera stage mapping to calculate x and y displacement from given overlap. |
| Method | _get |
Return a stitching settings model based on current settings. |
| Class Variable | _csm |
Undocumented |
Inherited from ScanWorkflow (via RectGridWorkflow):
| Class Variable | display |
Undocumented |
| Class Variable | save |
A tuple of the image resolution to capture. |
| Class Variable | ui |
Undocumented |
| Method | _autofocus |
Autofocus and then capture, this can be used as an acquisition routine. |
| Class Variable | _autofocus |
Undocumented |
| Class Variable | _cam |
Undocumented |
| Class Variable | _planner |
Undocumented |
| Class Variable | _settings |
Undocumented |
| Class Variable | _stage |
Undocumented |
def acquisition_routine(self, settings:
RegularGridSettingsModel, xyz_pos: tuple[ int, int, int]) -> tuple[ bool, int | None]:
(source)
¶
Autofocus and capture.
| Parameters | |
settings:RegularGridSettingsModel | The settings for this scan as a RegularGridSettingsModel |
xyztuple[ | The current position as a tuple or 3 ints. |
| Returns | |
tuple[ | 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[ RegularGridSettingsModel, StitchingSettings | None]:
(source)
¶
Return the workflow and stitching settings.
| Parameters | |
imagesstr | The directory that images are to be written to. |
| Returns | |
tuple[ | A tuple containing the settings model for this workflow and the settings model for stitching. |
def new_scan_planner(self, settings:
RegularGridSettingsModel, position: Mapping[ str, int]) -> ScanPlanner:
(source)
¶
Return a new scan planner object.
| Parameters | |
settings:RegularGridSettingsModel | The settings for this scan as a SnakeSettingsModel |
position:Mapping[ | The starting position as a mapping of axes names to int. |
| Returns | |
ScanPlanner | Undocumented |
Perform these steps before starting the scan.
In this case, only autofocus.
| Parameters | |
settings:RegularGridSettingsModel | The settings for this scan as as the relevant SettingsModel type. |