Don't import picamera to build system metadata
This commit is contained in:
parent
ee3d2d90cc
commit
c76e3e0ed3
1 changed files with 5 additions and 6 deletions
|
|
@ -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,16 +285,16 @@ 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()
|
||||
|
||||
b64_string, dtype, shape = serialise_array_b64(lst_arr)
|
||||
|
||||
|
||||
system_metadata["lens_shading_table"] = {
|
||||
"b64_string": b64_string,
|
||||
"dtype": dtype,
|
||||
"shape": shape
|
||||
"shape": shape,
|
||||
}
|
||||
|
||||
return system_metadata
|
||||
|
||||
return system_metadata
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue