Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen authored Feb 3, 2021
2 parents 0636047 + b01ce47 commit 9987c09
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions qcodes_contrib_drivers/drivers/Keysight/Keysight_E8267D.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from qcodes import VisaInstrument, validators as vals
from qcodes.utils.validators import Numbers
from qcodes.utils.helpers import create_on_off_val_mapping
from qcodes.instrument.parameter import DelegateParameter


def parse_on_off(stat):
Expand Down Expand Up @@ -74,20 +75,36 @@ def __init__(self, name, address, step_attenuator=False, **kwargs):
set_parser=float,
vals=vals.Numbers(1e5, 20e9),
docstring='Adjust the RF output frequency')
self.add_parameter(name='frequency_offset',
self.add_parameter(name='freq_offset',
label='Frequency offset',
unit='Hz',
get_cmd='FREQ:OFFS?',
set_cmd='FREQ:OFFS {}',
get_parser=float,
vals=Numbers(min_value=-200e9,
max_value=200e9))
self.add_parameter('frequency_mode',
self.add_parameter(name='frequency_offset',
source=self.freq_offset,
parameter_class=DelegateParameter,
docstring="'frequency_offset' delegate parameter "
"for 'freq_offset' is deprecated to "
"make the parameter name consistent with "
"that of one present in Agilent (Keysight)"
" E8267C driver in Qcodes")
self.add_parameter('freq_mode',
label='Frequency mode',
set_cmd='FREQ:MODE {}',
get_cmd='FREQ:MODE?',
get_parser=lambda s: s.strip(),
vals=vals.Enum('FIX', 'CW', 'SWE', 'LIST'))
self.add_parameter(name='frequency_mode',
source=self.freq_mode,
parameter_class=DelegateParameter,
docstring="'frequency_mode' delegate parameter for "
"'freq_mode' is deprecated to make the "
"parameter name consistent with that of "
"one present in Agilent (Keysight) E8267C "
"driver in Qcodes")
self.add_parameter(name='phase',
label='Phase',
unit='deg',
Expand All @@ -104,15 +121,32 @@ def __init__(self, name, address, step_attenuator=False, **kwargs):
get_parser=float,
set_parser=float,
vals=vals.Numbers(-130, 25))
self.add_parameter('status',
self.add_parameter('output_rf',
get_cmd=':OUTP?',
set_cmd='OUTP {}',
get_parser=parse_on_off,
vals=on_off_validator)
self.add_parameter(name='modulation_rf_enabled',
self.add_parameter(name='status',
source=self.output_rf,
parameter_class=DelegateParameter,
docstring="'status' delegate parameter for "
"'output_rf' is deprecated to make the "
"parameter name consistent with that of "
"one present in Agilent (Keysight) E8267C "
"driver in Qcodes")
self.add_parameter(name='modulation_rf',
get_cmd='OUTP:MOD?',
set_cmd='OUTP:MOD {}',
val_mapping=on_off_mapping)
self.add_parameter(name='modulation_rf_enabled',
source=self.modulation_rf,
parameter_class=DelegateParameter,
docstring="'modulation_rf_enabled' delegate "
"parameter for 'modulation_rf' is "
"deprecated to make the parameter name "
"consistent with that of one present in "
"Agilent (Keysight) E8267C driver in "
"Qcodes")
self.add_parameter('IQmodulator_enabled',
get_cmd='DM:STATe?',
set_cmd='DM:STATe {}',
Expand Down Expand Up @@ -142,10 +176,10 @@ def __init__(self, name, address, step_attenuator=False, **kwargs):
self.connect_message()

def on(self):
self.set('status', 'on')
self.output_rf('on')

def off(self):
self.set('status', 'off')
self.output_rf('off')

@staticmethod
def deg_to_rad(angle_deg):
Expand Down

0 comments on commit 9987c09

Please sign in to comment.