From 22e7ce4ef00843b863d29c9c28faaf1f0866d2a5 Mon Sep 17 00:00:00 2001 From: jaknapper Date: Fri, 5 Sep 2025 17:26:36 +0100 Subject: [PATCH] Change background detect to use lores stream for consistent stream even when scanning. --- src/openflexure_microscope_server/things/camera/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openflexure_microscope_server/things/camera/__init__.py b/src/openflexure_microscope_server/things/camera/__init__.py index ace9d74c..a48dc2c3 100644 --- a/src/openflexure_microscope_server/things/camera/__init__.py +++ b/src/openflexure_microscope_server/things/camera/__init__.py @@ -632,7 +632,7 @@ class BaseCamera(lt.Thing): @lt.thing_action def image_is_sample(self, portal: lt.deps.BlockingPortal) -> tuple[bool, str]: """Label the current image as either background or sample.""" - current_image = self.grab_as_array(portal) + current_image = self.grab_as_array(portal, stream_name="lores") return self.active_detector.image_is_sample(current_image) @lt.thing_action @@ -645,7 +645,7 @@ class BaseCamera(lt.Thing): future images to the distribution, to determine if each pixel is foreground or background. """ - background = self.grab_as_array(portal) + background = self.grab_as_array(portal, stream_name="lores") self.active_detector.set_background(background) # Manually save settings as the setter is not called. self.save_settings()