From c17d7af1abd90c4967e44292b6fc65b811f916d0 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Sun, 27 Jul 2025 19:26:05 +0000 Subject: [PATCH] Apply suggestions from code review of branch bg_detect_in_camera --- src/openflexure_microscope_server/background_detect.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openflexure_microscope_server/background_detect.py b/src/openflexure_microscope_server/background_detect.py index eae0018f..6a1b417f 100644 --- a/src/openflexure_microscope_server/background_detect.py +++ b/src/openflexure_microscope_server/background_detect.py @@ -190,8 +190,9 @@ class ColourChannelDetectLUV(BackgroundDetectAlgorithm): "Background is not set: you need to calibrate background detection." ) - # The ``[1:]`` is to only use the U and V channels of as brightness (L) often - # changes as the height of the sample changes. + # The ``[1:]`` selects only the U and V channels of the image. + # Only U and V are used as brightness (L) often changes as + # the height of the sample changes. # Wrapping in ``[[ ]]`` forces the colour channels to the numpy axis 2 # (3rd axis) so they are compared to the colour channel of each pixel. means = np.array([[self.background_data.means[1:]]])