Commit c76e3e0e authored by Joel Collins's avatar Joel Collins
Browse files

Don't import picamera to build system metadata

parent ee3d2d90
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ from openflexure_microscope.stage.base import BaseStage
from openflexure_microscope.stage.mock import MockStage
from openflexure_microscope.camera.base import BaseCamera
from openflexure_microscope.camera.mock import MockStreamer
from openflexure_microscope.camera.pi import PiCameraStreamer

from openflexure_microscope.utilities import serialise_array_b64
from openflexure_microscope.plugins import PluginLoader
@@ -286,7 +285,7 @@ class Microscope:
        }

        # Store an encoded copy of the PiCamera lens shading table, if it exists
        if self.camera and isinstance(self.camera, PiCameraStreamer):
        if self.camera and hasattr(self.camera, "read_lens_shading_table"):
            # Read LST. Returns None if no LST is active
            lst_arr = self.camera.read_lens_shading_table()

@@ -295,7 +294,7 @@ class Microscope:
            system_metadata["lens_shading_table"] = {
                "b64_string": b64_string,
                "dtype": dtype,
                "shape": shape
                "shape": shape,
            }

        return system_metadata