From adee2fc120d48b0de2399acc6d28b2d29325bb0a Mon Sep 17 00:00:00 2001 From: Simon Zihlmann Date: Mon, 22 Nov 2021 11:25:46 +0100 Subject: [PATCH 1/2] fix typo --- qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py b/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py index 8f2f73ff6..8a436d33c 100644 --- a/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py +++ b/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py @@ -1042,7 +1042,7 @@ def __init__(self, parent: 'RohdeSchwarz_SMW200A', name: str, hwchan: int, chnum set_cmd=f'SOUR{self.hwchan}:' + 'PM:RAT {}', get_cmd=f'SOUR{self.hwchan}:' + 'PM:RAT?', vals=vals.Numbers(0, 100), - unti='%', + unit='%', docstring="Sets the deviation ratio (path2 to path1) in percent.") self.add_parameter('sensitivity', From a4cf8c725186e20c9d8bfd62b157f4c4e8a6bbdd Mon Sep 17 00:00:00 2001 From: Simon Zihlmann Date: Mon, 22 Nov 2021 11:28:57 +0100 Subject: [PATCH 2/2] replace add_parameter with add_function and remove label for reset and execute functions of submodules --- .../drivers/RohdeSchwarz/SMW200A.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py b/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py index 8a436d33c..670208888 100644 --- a/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py +++ b/qcodes_contrib_drivers/drivers/RohdeSchwarz/SMW200A.py @@ -1129,8 +1129,7 @@ def __init__(self, parent: 'RohdeSchwarz_SMW200A', name: str, hwchan: int): docstring="Waveform shape for sweep. Allowed values" " are 'SAWTOOTH' and 'TRIANGLE'") - self.add_parameter('execute', - label='Executes one RF level sweep', + self.add_function('execute', call_cmd=f'SOUR{self.hwchan}:LFO:SWE:EXEC', docstring="Executes one RF level sweep. Use this without any ( )") @@ -1582,8 +1581,7 @@ def __init__(self, parent: 'RohdeSchwarz_SMW200A', name: str, hwchan: int): docstring="Waveform shape for sweep. Valid are 'SAWTOOTH' and" " 'TRIANGLE'.") - self.add_parameter('execute', - label='Executes one RF level sweep', + self.add_function('execute', call_cmd=f'SOUR{self.hwchan}:SWE:POW:EXEC', docstring="Executes one RF level sweep. Use no braces () here!") @@ -1606,8 +1604,7 @@ def __init__(self, parent: 'RohdeSchwarz_SMW200A', name: str, hwchan: int): docstring="(ReadOnly) Get the current sweep state. Return" " values are 'ON' or 'OFF'.") - self.add_parameter('reset', - label='Reset the sweep', + self.add_function('reset', call_cmd=f'SOUR{self.hwchan}:SWE:RES', docstring="Resets all active sweeps to the starting point." " Use no braces () here!") @@ -1695,8 +1692,7 @@ def __init__(self, parent: 'RohdeSchwarz_SMW200A', name: str, hwchan: int): docstring="Waveform shape for sweep. Valid values are 'SAWTOOTH' or" " 'TRIANGLE'.") - self.add_parameter('execute', - label='Executes one RF frequency sweep', + self.add_function('execute', call_cmd=f'SOUR{self.hwchan}:SWE:EXEC', docstring="Executes one RF frequency sweep. Use no braces () here!") @@ -1741,8 +1737,7 @@ def __init__(self, parent: 'RohdeSchwarz_SMW200A', name: str, hwchan: int): " of the output channel and will be read during the" " set lin_step command.") - self.add_parameter('reset', - label='Reset the sweep', + self.add_function('reset', call_cmd=f'SOUR{self.hwchan}:SWE:RES', docstring="Resets all active sweeps to the starting point." " Use no braces () here!")