@@ -666,8 +666,9 @@ def set_speed_as_percent_max(self, pct: float) -> None:
666666 Percentage of the maximum speed
667667 """
668668 if self .default_axes_sequence is None :
669- logger .error (f"{ str (self )} , Default axes sequence is not set. "
670- f"Cannot set speed." )
669+ logger .error (
670+ f"{ str (self )} , Default axes sequence is not set. " f"Cannot set speed."
671+ )
671672 raise ASIException (
672673 "Unable to query system for axis sequence. Cannot set speed."
673674 )
@@ -860,8 +861,8 @@ def send_filter_wheel_command(self, cmd: str) -> None:
860861 self .send_command (f"{ cmd } \n " )
861862 # print(f"Sent Command: {command.decode(encoding='ascii')}")
862863
863- def select_filter_wheel (self , filter_wheel_number : int = 0 ) -> None :
864- """ Select the filter wheel, e.g., 0, 1...
864+ def select_filter_wheel (self , filter_wheel_number : int = 0 ) -> None :
865+ """Select the filter wheel, e.g., 0, 1...
865866
866867 Sets the current filter wheel for later commands. Prompt shows the currently
867868 selected wheel, e.g., 0> is a result of FW 0 command. If the selected wheel is
@@ -882,7 +883,7 @@ def select_filter_wheel(self, filter_wheel_number: int=0) -> None:
882883 self .send_filter_wheel_command (f"FW { filter_wheel_number } " )
883884 self .read_response ()
884885
885- def move_filter_wheel (self , filter_wheel_position : int = 0 ) -> None :
886+ def move_filter_wheel (self , filter_wheel_position : int = 0 ) -> None :
886887 """Move Filter Wheel
887888
888889 Move to filter position n , where n is a valid filter position.
@@ -904,7 +905,7 @@ def move_filter_wheel_to_home(self) -> None:
904905 self .send_filter_wheel_command ("HO" )
905906 self .read_response ()
906907
907- def change_filter_wheel_speed (self , speed : int = 0 ) -> None :
908+ def change_filter_wheel_speed (self , speed : int = 0 ) -> None :
908909 """Change the Filter-Wheel Speed
909910
910911 Selects a consistent set of preset acceleration and speed parameters.
@@ -925,7 +926,7 @@ def halt_filter_wheel(self) -> None:
925926 self .send_filter_wheel_command ("HA" )
926927 self .read_response ()
927928
928- def move_dichroic (self , dichroic_id : str , dichroic_position : int = 0 ) -> None :
929+ def move_dichroic (self , dichroic_id : str , dichroic_position : int = 0 ) -> None :
929930 """Move Dichroic Slider.
930931
931932 Move to dichroic position n , where n is a valid filter position.
@@ -952,36 +953,33 @@ def square_wave(self, on_time: int, delay_time: int) -> None:
952953 Delay time in quarter milliseconds
953954 """
954955
955- commands = ['CCA X=0' ,
956-
957- 'M E=2' ,
958- 'CCA Y=15' ,
959- f'CCA Z={ delay_time } ' ,
960- 'CCB X=68 Y=192 Z=0' ,
961-
962- 'M E=3' ,
963- 'CCA Y=5' ,
964- 'CCB X=1 Y=66' ,
965-
966- 'M E=4' ,
967- 'CCA Y=14' ,
968- f'CCA Z={ on_time } ' ,
969- 'CCB X=3 Y=192 Z=0' ,
970-
971- 'M E=33' ,
972- 'CCA Z=1' ,
973- 'M E=34' ,
974- 'CCA Z=2' ,
975- 'M E=35' ,
976- 'CCA Z=3' ,
977- 'M E=36' ,
978- 'CCA Z=4' ,
979-
980- 'M E=1' ,
981- 'CCA Z=1' ]
956+ commands = [
957+ "CCA X=0" ,
958+ "M E=2" ,
959+ "CCA Y=15" ,
960+ f"CCA Z={ delay_time } " ,
961+ "CCB X=68 Y=192 Z=0" ,
962+ "M E=3" ,
963+ "CCA Y=5" ,
964+ "CCB X=1 Y=66" ,
965+ "M E=4" ,
966+ "CCA Y=14" ,
967+ f"CCA Z={ on_time } " ,
968+ "CCB X=3 Y=192 Z=0" ,
969+ "M E=33" ,
970+ "CCA Z=1" ,
971+ "M E=34" ,
972+ "CCA Z=2" ,
973+ "M E=35" ,
974+ "CCA Z=3" ,
975+ "M E=36" ,
976+ "CCA Z=4" ,
977+ "M E=1" ,
978+ "CCA Z=1" ,
979+ ]
982980 for command in commands :
983981 # Send data
984- self .send_command (f' { command } \r ' )
982+ self .send_command (f" { command } \r " )
985983 self .read_response ()
986984
987985 def logic_card_on (self , axis : str ) -> None :
@@ -994,9 +992,9 @@ def logic_card_on(self, axis: str) -> None:
994992 """
995993
996994 axis = int (axis ) + 32
997- self .send_command (f' 6 M E = { axis } \r ' )
995+ self .send_command (f" 6 M E = { axis } \r " )
998996 self .read_response ()
999- self .send_command (f' 6 CCA Z=64\r ' )
997+ self .send_command (f" 6 CCA Z=64\r " )
1000998 self .read_response ()
1001999
10021000 def logic_card_off (self , axis : str ) -> None :
@@ -1008,7 +1006,7 @@ def logic_card_off(self, axis: str) -> None:
10081006 The axis of the logic card
10091007 """
10101008 axis = int (axis ) + 32
1011- self .send_command (f'6 M E = { axis } \r ' )
1009+ self .send_command (f"6 M E = { axis } \r " )
1010+ self .read_response ()
1011+ self .send_command (f"6 CCA Z=0\r " )
10121012 self .read_response ()
1013- self .send_command (f'6 CCA Z=0\r ' )
1014- self .read_response ()
0 commit comments