diff --git a/src/pymodaq_plugins_utils/hardware/camera_base.py b/src/pymodaq_plugins_utils/hardware/camera_base.py index 0cd2610..69bfc3e 100644 --- a/src/pymodaq_plugins_utils/hardware/camera_base.py +++ b/src/pymodaq_plugins_utils/hardware/camera_base.py @@ -146,10 +146,9 @@ class CameraBase(DAQ_Viewer_base): callback_signal = QtCore.Signal(Grab) live_mode_available = True - # The camera thread already averages Naverage frames (Grab.n_average): once the pymodaq releases that contain the fix - # of the live mode (PyMoDAQ #1421) are the minimum required, this should be True, otherwise the viewer averages - # the averaged frames a second time. - hardware_averaging = False + # The camera thread already averages Naverage frames (Grab.n_average), so the viewer must not average them again. It + # does not since pymodaq 5.3.9 (PyMoDAQ #1421, the live mode no longer depends on hardware_averaging). + hardware_averaging = True def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/tests/test_camera_base.py b/tests/test_camera_base.py index 92f117f..283436d 100644 --- a/tests/test_camera_base.py +++ b/tests/test_camera_base.py @@ -187,6 +187,12 @@ def test_optional_methods_are_harmless(self): class TestCameraBase: + def test_the_camera_averages_so_the_viewer_does_not(self): + """The frames are averaged by the camera thread (Grab.n_average): the viewer averaging them again would grab + Naverage x Naverage frames""" + assert CameraBase.hardware_averaging is True + assert CameraBase.live_mode_available is True + def test_grab_a_full_frame(self, camera): dte = grab_and_wait(camera) assert dte[0].shape == (HEIGHT, WIDTH)