@@ -257,8 +257,11 @@ def start_camera(
257257 for start_function in plugin_devices ["camera" ]["start_device" ]:
258258 try :
259259 return start_function (
260- microscope_name , device_connection , configuration , is_synthetic ,
261- device_type = "camera"
260+ microscope_name ,
261+ device_connection ,
262+ configuration ,
263+ is_synthetic ,
264+ device_type = "camera" ,
262265 )
263266 except RuntimeError :
264267 continue
@@ -438,9 +441,10 @@ def load_stages(configuration, is_synthetic=False, plugin_devices={}):
438441 exception = TLFTDICommunicationError ,
439442 )
440443 )
444+
441445 elif stage_type == "KST101" :
442446 from navigate .model .devices .stages .stage_tl_kcube_steppermotor import (
443- build_TLKSTStage_connection
447+ build_TLKSTStage_connection ,
444448 )
445449
446450 stage_devices .append (
@@ -450,6 +454,7 @@ def load_stages(configuration, is_synthetic=False, plugin_devices={}):
450454 exception = Exception ,
451455 )
452456 )
457+
453458 elif stage_type == "MCL" and platform .system () == "Windows" :
454459 from navigate .model .devices .stages .stage_mcl import (
455460 build_MCLStage_connection ,
@@ -644,12 +649,12 @@ def start_stage(
644649 from navigate .model .devices .stages .stage_tl_kcube_inertial import TLKIMStage
645650
646651 return TLKIMStage (microscope_name , device_connection , configuration , id )
647-
652+
648653 elif device_type == "KST101" :
649654 from navigate .model .devices .stages .stage_tl_kcube_steppermotor import TLKSTStage
650655
651656 return TLKSTStage (microscope_name , device_connection , configuration , id )
652-
657+
653658 elif device_type == "MCL" :
654659 from navigate .model .devices .stages .stage_mcl import MCLStage
655660
@@ -685,8 +690,12 @@ def start_stage(
685690 for start_function in plugin_devices ["stage" ]["start_device" ]:
686691 try :
687692 return start_function (
688- microscope_name , device_connection , configuration , is_synthetic ,
689- device_type = "stage" , id = id
693+ microscope_name ,
694+ device_connection ,
695+ configuration ,
696+ is_synthetic ,
697+ device_type = "stage" ,
698+ id = id ,
690699 )
691700 except RuntimeError :
692701 continue
@@ -812,8 +821,11 @@ def start_zoom(
812821 for start_zoom in plugin_devices ["zoom" ]["start_device" ]:
813822 try :
814823 return start_zoom (
815- microscope_name , device_connection , configuration , is_synthetic ,
816- device_type = "zoom"
824+ microscope_name ,
825+ device_connection ,
826+ configuration ,
827+ is_synthetic ,
828+ device_type = "zoom" ,
817829 )
818830 except RuntimeError :
819831 continue
@@ -874,7 +886,7 @@ def load_filter_wheel_connection(configuration, is_synthetic=False, plugin_devic
874886
875887 elif device_type == "NI" :
876888 return DummyDeviceConnection ()
877-
889+
878890 elif (
879891 device_type .lower () == "syntheticfilterwheel"
880892 or device_type .lower () == "synthetic"
@@ -891,6 +903,7 @@ def load_filter_wheel_connection(configuration, is_synthetic=False, plugin_devic
891903 except RuntimeError :
892904 continue
893905 device_not_found ("filter_wheel" , device_type )
906+
894907 else :
895908 device_not_found ("filter_wheel" , device_type )
896909
@@ -939,6 +952,7 @@ def start_filter_wheel(
939952 device_type = configuration ["configuration" ]["microscopes" ][microscope_name ][
940953 "filter_wheel"
941954 ]["hardware" ]["type" ]
955+
942956 if device_type == "SutterFilterWheel" :
943957 from navigate .model .devices .filter_wheel .filter_wheel_sutter import (
944958 SutterFilterWheel ,
@@ -952,11 +966,10 @@ def start_filter_wheel(
952966 return ASIFilterWheel (microscope_name , device_connection , configuration )
953967
954968 elif device_type == "NI" :
955-
956969 from navigate .model .devices .filter_wheel .filter_wheel_daq import DAQFilterWheel
957-
970+
958971 return DAQFilterWheel (microscope_name , device_connection , configuration )
959-
972+
960973 elif (
961974 device_type .lower () == "syntheticfilterwheel"
962975 or device_type .lower () == "synthetic"
@@ -968,16 +981,19 @@ def start_filter_wheel(
968981 return SyntheticFilterWheel (microscope_name , device_connection , configuration )
969982
970983 elif "filter_wheel" in plugin_devices :
971-
972984 for start_function in plugin_devices ["filter_wheel" ]["start_device" ]:
973985 try :
974986 return start_function (
975- microscope_name , device_connection , configuration , is_synthetic ,
976- device_type = "filter_wheel"
987+ microscope_name ,
988+ device_connection ,
989+ configuration ,
990+ is_synthetic ,
991+ device_type = "filter_wheel" ,
977992 )
978993 except RuntimeError :
979994 continue
980995 device_not_found (microscope_name , "filter_wheel" , device_type )
996+
981997 else :
982998 device_not_found (microscope_name , "filter_wheel" , device_type )
983999
@@ -1090,8 +1106,11 @@ def start_shutter(
10901106 for start_function in plugin_devices ["shutter" ]["start_device" ]:
10911107 try :
10921108 return start_function (
1093- microscope_name , None , configuration , is_synthetic ,
1094- device_type = "shutter"
1109+ microscope_name ,
1110+ None ,
1111+ configuration ,
1112+ is_synthetic ,
1113+ device_type = "shutter" ,
10951114 )
10961115 except RuntimeError :
10971116 continue
@@ -1163,7 +1182,12 @@ def start_lasers(
11631182 for start_function in plugin_devices ["lasers" ]["start_device" ]:
11641183 try :
11651184 return start_function (
1166- microscope_name , device_connection , configuration , is_synthetic , device_type = "lasers" , id = id
1185+ microscope_name ,
1186+ device_connection ,
1187+ configuration ,
1188+ is_synthetic ,
1189+ device_type = "lasers" ,
1190+ id = id ,
11671191 )
11681192 except RuntimeError :
11691193 continue
@@ -1217,14 +1241,12 @@ def start_remote_focus_device(
12171241
12181242 if device_type == "NI" :
12191243 from navigate .model .devices .remote_focus .remote_focus_ni import RemoteFocusNI
1220-
12211244 return RemoteFocusNI (microscope_name , device_connection , configuration )
12221245
12231246 elif device_type == "EquipmentSolutions" :
12241247 from navigate .model .devices .remote_focus .remote_focus_equipment_solutions import (
12251248 RemoteFocusEquipmentSolutions ,
12261249 )
1227-
12281250 return RemoteFocusEquipmentSolutions (
12291251 microscope_name , device_connection , configuration
12301252 )
@@ -1244,8 +1266,11 @@ def start_remote_focus_device(
12441266 for start_function in plugin_devices ["remote_focus_device" ]["start_device" ]:
12451267 try :
12461268 return start_function (
1247- microscope_name , device_connection , configuration , is_synthetic ,
1248- device_type = "remote_focus_device"
1269+ microscope_name ,
1270+ device_connection ,
1271+ configuration ,
1272+ is_synthetic ,
1273+ device_type = "remote_focus_device" ,
12491274 )
12501275 except RuntimeError :
12511276 continue
@@ -1312,8 +1337,12 @@ def start_galvo(
13121337 for start_function in plugin_devices ["galvo" ]["start_device" ]:
13131338 try :
13141339 return start_function (
1315- microscope_name , device_connection , configuration , is_synthetic ,
1316- device_type = "galvo" , id = id
1340+ microscope_name ,
1341+ device_connection ,
1342+ configuration ,
1343+ is_synthetic ,
1344+ device_type = "galvo" ,
1345+ id = id ,
13171346 )
13181347 except RuntimeError :
13191348 continue
0 commit comments