Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awg enhancements #538

Merged
merged 7 commits into from
Mar 28, 2017
Merged
23 changes: 20 additions & 3 deletions qcodes/instrument_drivers/tektronix/AWG5014.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,20 @@ def __init__(self, name, address, timeout=180, **kwargs):
vals=vals.Enum('CONT', 'TRIG', 'SEQ', 'GAT'),
get_parser=self.newlinestripper
)
self.add_parameter('ref_clock_source',
label='Reference clock source',
self.add_parameter('clock_source',
label='Clock source',
get_cmd='AWGControl:CLOCk:SOURce?',
set_cmd='AWGControl:CLOCk:SOURce ' + '{}',
vals=vals.Enum('INT', 'EXT'),
get_parser=self.newlinestripper)

self.add_parameter('ref_source',
label='Reference source',
get_cmd='SOURce1:ROSCillator:SOURce?',
set_cmd='SOURce1:ROSCillator:SOURce ' + '{}',
vals=vals.Enum('INT', 'EXT'),
get_parser=self.newlinestripper)

self.add_parameter('DC_output',
label='DC Output (ON/OFF)',
get_cmd='AWGControl:DC:STATe?',
Expand Down Expand Up @@ -331,8 +339,9 @@ def __init__(self, name, address, timeout=180, **kwargs):
get_cmd=filter_cmd + '?',
set_cmd=filter_cmd + ' {}',
vals=vals.Enum(20e6, 100e6, 9.9e37,
np.float('inf'),
'INF', 'INFinity'),
get_parser=float)
get_parser=self._tek_outofrange_get_parser)
self.add_parameter('ch{}_DC_out'.format(i),
label='DC output level channel {}'.format(i),
unit='V',
Expand Down Expand Up @@ -387,6 +396,14 @@ def newlinestripper(self, string):
else:
return string

def _tek_outofrange_get_parser(self, string):
val = float(string)
# note that 9.9e37 is used as a generic out of range value
# in tektronix instruments
if val >= 9.9e37:
val = np.float('INF')
return val

# Functions
def get_all(self, update=True):
"""
Expand Down