class SmartStackMixin: (source)
Known subclasses: openflexure_microscope_server.things.scan_workflows.HistoScanWorkflow, openflexure_microscope_server.things.scan_workflows.RegularGridWorkflow
A mixin for scan workflows that use smart stacking.
| Method | create |
Set up the parameters used for all smart stacks in a scan. |
| Method | smart |
Return smart stack property controls for the UI. |
| Class Variable | stack |
Distance in steps between images in a z-stack. |
| Instance Variable | stack |
The number of images to save in a stack. |
| Instance Variable | stack |
The minimum number of images to capture in a stack. |
| Property | as |
Return self as a ScanWorkflow. |
| Method | _perform |
Perform acquisition a smart stack. |
Set up the parameters used for all smart stacks in a scan.
| Returns | |
SmartStackParams | A StackSmartParams object with the required parameters. |
Distance in steps between images in a z-stack.
Suggested values:
- 50 for 60-100x
- 100 for 40x
- 200 for 20x
The minimum number of images to capture in a stack.
This many images are captured and tested for focus, if the focus is not central enough more images may be captured. After new images are captured, this value sets the number of images used for checking if focus is achieved.
Defaults to 9 which balances reliability and speed.
Return self as a ScanWorkflow.
Ensures this mixin is only used with ScanWorkflow instances, raising TypeError otherwise.
SmartStackCompatibleSettings, xyz_pos: tuple[ int, int, int]) -> tuple[ bool, int | None]:
(source)
¶
Perform acquisition a smart stack.
| Parameters | |
settings:SmartStackCompatibleSettings | The settings for this scan as a HistoScanSettingsModel |
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. |