@@ -2799,7 +2799,7 @@ def __init__(self, name, parent_device, connection, digital_gate={}, freq_limits
2799
2799
digital_gate (dict, optional): Configures a digital output to use as an enable/disable
2800
2800
gate for the output. Should contain keys `'device'` and `'connection'`
2801
2801
with arguments for the `parent_device` and `connection` for instantiating
2802
- the :obj:`DigitalOut`.
2802
+ the :obj:`DigitalOut`. All other (optional) keys are passed as kwargs.
2803
2803
freq_limits (tuple, optional): `(lower, upper)` limits for the
2804
2804
frequency of the output
2805
2805
freq_conv_class (:obj:`labscript_utils:labscript_utils.unitconversions`, optional):
@@ -2851,8 +2851,10 @@ def __init__(self, name, parent_device, connection, digital_gate={}, freq_limits
2851
2851
self .phase = AnalogQuantity (self .name + '_phase' , self , 'phase' , phase_limits , phase_conv_class , phase_conv_params )
2852
2852
2853
2853
self .gate = None
2854
- if 'device' in digital_gate and 'connection' in digital_gate :
2855
- self .gate = DigitalOut (name + '_gate' , digital_gate ['device' ], digital_gate ['connection' ])
2854
+ if 'device' in digital_gate and 'connection' in digital_gate :
2855
+ dev = digital_gate .pop ('device' )
2856
+ conn = digital_gate .pop ('connection' )
2857
+ self .gate = DigitalOut (name + '_gate' , dev , conn , ** digital_gate )
2856
2858
# Did they only put one key in the dictionary, or use the wrong keywords?
2857
2859
elif len (digital_gate ) > 0 :
2858
2860
raise LabscriptError ('You must specify the "device" and "connection" for the digital gate of %s.' % (self .name ))
@@ -2980,7 +2982,7 @@ def __init__(self,name,parent_device,connection,digital_gate = {},freq_limits =
2980
2982
digital_gate (dict, optional): Configures a digital output to use as an enable/disable
2981
2983
gate for the output. Should contain keys `'device'` and `'connection'`
2982
2984
with arguments for the `parent_device` and `connection` for instantiating
2983
- the :obj:`DigitalOut`.
2985
+ the :obj:`DigitalOut`. All other (optional) keys are passed as kwargs.
2984
2986
freq_limits (tuple, optional): `(lower, upper)` limits for the
2985
2987
frequency of the output
2986
2988
freq_conv_class (:obj:`labscript_utils:labscript_utils.unitconversions`, optional):
@@ -3030,8 +3032,10 @@ def __init__(self,name,parent_device,connection,digital_gate = {},freq_limits =
3030
3032
self .amplitude = StaticAnalogQuantity (self .name + '_amp' ,self ,'amp' ,amp_limits ,amp_conv_class ,amp_conv_params )
3031
3033
self .phase = StaticAnalogQuantity (self .name + '_phase' ,self ,'phase' ,phase_limits ,phase_conv_class ,phase_conv_params )
3032
3034
3033
- if 'device' in digital_gate and 'connection' in digital_gate :
3034
- self .gate = DigitalOut (self .name + '_gate' ,digital_gate ['device' ],digital_gate ['connection' ])
3035
+ if 'device' in digital_gate and 'connection' in digital_gate :
3036
+ dev = digital_gate .pop ('device' )
3037
+ conn = digital_gate .pop ('connection' )
3038
+ self .gate = DigitalOut (name + '_gate' , dev , conn , ** digital_gate )
3035
3039
# Did they only put one key in the dictionary, or use the wrong keywords?
3036
3040
elif len (digital_gate ) > 0 :
3037
3041
raise LabscriptError ('You must specify the "device" and "connection" for the digital gate of %s.' % (self .name ))
0 commit comments