Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ulc_mm_package/hardware/scope_routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def flow_control_routine(
flow_controller.set_alpha(
processing_constants.FLOW_CONTROL_EWMA_ALPHA * 2
) # Double the alpha, ~halve the half life
flow_controller.pneumatic_module.min_step_size *= 2

while True:
img, timestamp = yield flow_val, syringe_can_move
Expand All @@ -269,6 +270,7 @@ def flow_control_routine(
if fast_flow:
if flow_error is not None:
if flow_error == 0:
flow_controller.pneumatic_module.min_step_size /= 2
return flow_val

@init_generator
Expand Down Expand Up @@ -497,6 +499,11 @@ def find_cells_routine(
except NoCellsFound:
cell_finder.reset()

# Defensive check, ensure the motor isn't moving (say for example,
# if CellFinder was triggered by an OOF exception and SSAF just triggered a motor move)
while mscope.motor.is_locked():
pass

while True:
"""
1. Pull syringe for pull_time seconds (unless deliberately skipped)
Expand Down