@@ -491,8 +491,8 @@ def __init__(
491491 get_parser = float ,
492492 )
493493
494- self .set ("trigger_impedance" , 50 )
495- if self .get ("clock_freq" ) != 1e9 :
494+ self .trigger_impedance . set (50 )
495+ if self .clock_freq . get () != 1e9 :
496496 log .info ("AWG clock freq not set to 1GHz" )
497497
498498 self .connect_message ()
@@ -657,12 +657,12 @@ def all_channels_on(self) -> None:
657657 defined waveforms can be ON.
658658 """
659659 for i in range (1 , self .num_channels + 1 ):
660- self .set ( f"ch{ i } _state" , 1 )
660+ self .parameters [ f"ch{ i } _state" ]. set ( 1 )
661661
662662 def all_channels_off (self ) -> None :
663663 """Set the state of all channels to be OFF."""
664664 for i in range (1 , self .num_channels + 1 ):
665- self .set ( f"ch{ i } _state" , 0 )
665+ self .parameters [ f"ch{ i } _state" ]. set ( 0 )
666666
667667 #####################
668668 # Sequences section #
@@ -947,7 +947,7 @@ def generate_sequence_cfg(self) -> dict[str, float]:
947947 log .info ("Generating sequence_cfg" )
948948
949949 AWG_sequence_cfg = {
950- "SAMPLING_RATE" : self .get ("clock_freq" ),
950+ "SAMPLING_RATE" : self .clock_freq . get (),
951951 "CLOCK_SOURCE" : (
952952 1 if self .clock_source ().startswith ("INT" ) else 2
953953 ), # Internal | External
@@ -957,27 +957,27 @@ def generate_sequence_cfg(self) -> dict[str, float]:
957957 "EXTERNAL_REFERENCE_TYPE" : 1 , # Fixed | Variable
958958 "REFERENCE_CLOCK_FREQUENCY_SELECTION" : 1 ,
959959 # 10 MHz | 20 MHz | 100 MHz
960- "TRIGGER_SOURCE" : 1 if self .get ("trigger_source" ).startswith ("EXT" ) else 2 ,
960+ "TRIGGER_SOURCE" : 1 if self .trigger_source . get ().startswith ("EXT" ) else 2 ,
961961 # External | Internal
962962 "TRIGGER_INPUT_IMPEDANCE" : (
963- 1 if self .get ("trigger_impedance" ) == 50.0 else 2
963+ 1 if self .trigger_impedance . get () == 50.0 else 2
964964 ), # 50 ohm | 1 kohm
965965 "TRIGGER_INPUT_SLOPE" : (
966- 1 if self .get ("trigger_slope" ).startswith ("POS" ) else 2
966+ 1 if self .trigger_slope . get ().startswith ("POS" ) else 2
967967 ), # Positive | Negative
968968 "TRIGGER_INPUT_POLARITY" : (
969969 1 if self .ask ("TRIGger:POLarity?" ).startswith ("POS" ) else 2
970970 ), # Positive | Negative
971- "TRIGGER_INPUT_THRESHOLD" : self .get ("trigger_level" ), # V
971+ "TRIGGER_INPUT_THRESHOLD" : self .trigger_level . get (), # V
972972 "EVENT_INPUT_IMPEDANCE" : (
973- 1 if self .get ("event_impedance" ) == 50.0 else 2
973+ 1 if self .event_impedance . get () == 50.0 else 2
974974 ), # 50 ohm | 1 kohm
975975 "EVENT_INPUT_POLARITY" : (
976- 1 if self .get ("event_polarity" ).startswith ("POS" ) else 2
976+ 1 if self .event_polarity . get ().startswith ("POS" ) else 2
977977 ), # Positive | Negative
978- "EVENT_INPUT_THRESHOLD" : self .get ( " event_level" ), # V
978+ "EVENT_INPUT_THRESHOLD" : self .event_level ( ), # V
979979 "JUMP_TIMING" : (
980- 1 if self .get ("event_jump_timing" ).startswith ("SYNC" ) else 2
980+ 1 if self .event_jump_timing . get ().startswith ("SYNC" ) else 2
981981 ), # Sync | Async
982982 "RUN_MODE" : 4 , # Continuous | Triggered | Gated | Sequence
983983 "RUN_STATE" : 0 , # On | Off
0 commit comments