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
25 changes: 24 additions & 1 deletion ulc_mm_package/utilities/zstack_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ def set_brightness(autobrightness: Autobrightness) -> None:
img, _ = next(camera.yieldImages())
try:
brightness_achieved = autobrightness.runAutobrightness(img)
autobrightness.reset()
except BrightnessTargetNotAchieved:
logger.info("Brightness target not achieved but usable. Proceeding...")
autobrightness.reset()
Expand Down Expand Up @@ -592,6 +591,30 @@ def start_sweep(n_steps: int = 20, imgs_per_step: int = 2):
except NoCellsFound:
result = None

# Re-run sweep since setting the syringe lifts the flow cell up
# when we set the flowrate
status_label.config(text="CelFinder post flow...")
root.update()
collected_images = sweep(
camera,
motor,
led,
sweep_range,
cell_finder,
update_progress,
update_image,
update_motor_label,
n_imgs_per_step=imgs_per_step,
save_path=None,
collect_images=True,
)

try:
result = cell_finder.get_cells_found_position()
status_label.config(text="Cells found!")
except NoCellsFound:
result = None

if result is None:
# No cells found automatically - launch manual review
def do_local_sweep(center_pos):
Expand Down