Merge branch 'settling_before_stack' into 'v3'
Settling time as global, settle before taking first image in stack See merge request openflexure/openflexure-microscope-server!272
This commit is contained in:
commit
8431cd1d15
1 changed files with 4 additions and 1 deletions
|
|
@ -34,6 +34,8 @@ from .capture import CaptureThing
|
||||||
|
|
||||||
CaptureDep = direct_thing_client_dependency(CaptureThing, "/capture/")
|
CaptureDep = direct_thing_client_dependency(CaptureThing, "/capture/")
|
||||||
|
|
||||||
|
SETTLING_TIME = 0.3
|
||||||
|
|
||||||
|
|
||||||
class JPEGSharpnessMonitor:
|
class JPEGSharpnessMonitor:
|
||||||
__globals__ = globals() # Required for FastAPI dependency
|
__globals__ = globals() # Required for FastAPI dependency
|
||||||
|
|
@ -295,6 +297,8 @@ class AutofocusThing(Thing):
|
||||||
stage.move_relative(z=-stack_z_range / 2)
|
stage.move_relative(z=-stack_z_range / 2)
|
||||||
|
|
||||||
for capture_count in range(images_to_capture):
|
for capture_count in range(images_to_capture):
|
||||||
|
time.sleep(SETTLING_TIME)
|
||||||
|
|
||||||
jpeg_path = os.path.join(
|
jpeg_path = os.path.join(
|
||||||
stack_dir,
|
stack_dir,
|
||||||
f"{capture_count}.jpeg",
|
f"{capture_count}.jpeg",
|
||||||
|
|
@ -309,7 +313,6 @@ class AutofocusThing(Thing):
|
||||||
# If the stack isn't complete yet, move
|
# If the stack isn't complete yet, move
|
||||||
if capture_count + 1 < images_to_capture:
|
if capture_count + 1 < images_to_capture:
|
||||||
stage.move_relative(z=stack_dz)
|
stage.move_relative(z=stack_dz)
|
||||||
time.sleep(0.3)
|
|
||||||
|
|
||||||
self.copy_central_image_from_stack(images_dir, stack_dir)
|
self.copy_central_image_from_stack(images_dir, stack_dir)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue