Skip to content

Commit a78ed95

Browse files
committed
Modify Spinnaker Camera so proprietary PySpin import does not happen on
module load. Fixes docs-build failure and allows use of the Mock Camera for those without PySpin installed.
1 parent b8e7923 commit a78ed95

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

labscript_devices/SpinnakerCamera/blacs_workers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import numpy as np
1919
from labscript_utils import dedent
2020
from enum import IntEnum
21-
import PySpin
2221
from time import sleep, perf_counter
2322

2423
from labscript_devices.IMAQdxCamera.blacs_workers import IMAQdxCameraWorker
@@ -28,6 +27,9 @@ def __init__(self, serial_number):
2827
"""Initialize Spinnaker API camera.
2928
3029
Serial number should be of string(?) type."""
30+
global PySpin
31+
import PySpin
32+
3133
self.system = PySpin.System.GetInstance()
3234

3335
ver = self.system.GetLibraryVersion()

0 commit comments

Comments
 (0)