Added posh stop to slow autofocus
This commit is contained in:
parent
d7f4ee48d0
commit
5c99da264f
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from labthings import fields, find_component
|
||||
from labthings import fields, find_component, current_action
|
||||
from labthings.extensions import BaseExtension
|
||||
from labthings.views import View, ActionView, PropertyView
|
||||
|
||||
|
|
@ -188,6 +188,8 @@ def autofocus(microscope, dz, settle=0.5, metric_fn=sharpness_sum_lap2):
|
|||
camera.annotate_text = ""
|
||||
|
||||
for _ in stage.scan_z(dz, return_to_start=False):
|
||||
if current_action() and current_action().stopped:
|
||||
return
|
||||
positions.append(stage.position[2])
|
||||
time.sleep(settle)
|
||||
sharpnesses.append(measure_sharpness(microscope, metric_fn))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue