From 9145c286fe1d7431419fb84abd1b198931b0fd96 Mon Sep 17 00:00:00 2001 From: TNO-Selene Date: Wed, 15 Jan 2025 10:16:27 +0100 Subject: [PATCH 1/7] Add ZNLE VNA --- .../instrument_drivers/rohde_schwarz/ZNB.py | 25 ++++++++++++++++++- .../instrument_drivers/rohde_schwarz/ZNLE.py | 4 +++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py b/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py index 1cd0645c9c9..69021aba9b7 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py @@ -442,11 +442,29 @@ def __init__( "ZNB8": -80, "ZNB20": -60, "ZNB40": -60, + "ZNLE3": -10, + "ZNLE4": -10, + "ZNLE6": -10, + "ZNLE14": -10, + "ZNLE18": -10, + } + self._model_max_source_power = { + "ZNB4": 25, + "ZNB8": 25, + "ZNB20": 25, + "ZNB40": 25, + "ZNLE3": 0, + "ZNLE4": 0, + "ZNLE6": 0, + "ZNLE14": 0, + "ZNLE18": 0, } if model not in self._model_min_source_power.keys(): raise RuntimeError(f"Unsupported ZNB model: {model}") self._min_source_power: float self._min_source_power = self._model_min_source_power[model] + self._max_source_power: float + self._max_source_power = self._model_max_source_power[model] self.vna_parameter: Parameter = self.add_parameter( name="vna_parameter", @@ -462,7 +480,7 @@ def __init__( get_cmd=f"SOUR{n}:POW?", set_cmd=f"SOUR{n}:POW {{:.4f}}", get_parser=float, - vals=vals.Numbers(self._min_source_power, 25), + vals=vals.Numbers(self._min_source_power, self._max_source_power), ) """Parameter power""" self.bandwidth: Parameter = self.add_parameter( @@ -1059,6 +1077,11 @@ def __init__( "ZNB8": (9e3, 8.5e9), "ZNB20": (100e3, 20e9), "ZNB40": (10e6, 40e9), + "ZNLE3": (1e6, 3e9), + "ZNLE4": (1e6, 4e9), + "ZNLE6": (1e6, 6e9), + "ZNLE14": (1e6, 14e9), + "ZNLE18": (1e6, 18e9), } if model not in m_frequency.keys(): raise RuntimeError(f"Unsupported ZNB model {model}") diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py b/src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py new file mode 100644 index 00000000000..c41f7a040e5 --- /dev/null +++ b/src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py @@ -0,0 +1,4 @@ +from .ZNB import RohdeSchwarzZNBBase + +class ZNLE(RohdeSchwarzZNBBase): + pass From 78dbdf641b42de903baa2c52044fc20803a43ff3 Mon Sep 17 00:00:00 2001 From: TNO-Selene Date: Wed, 15 Jan 2025 13:32:25 +0100 Subject: [PATCH 2/7] Newsfragment --- docs/changes/newsfragments/ZNLE_addition.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/changes/newsfragments/ZNLE_addition.txt diff --git a/docs/changes/newsfragments/ZNLE_addition.txt b/docs/changes/newsfragments/ZNLE_addition.txt new file mode 100644 index 00000000000..96324df88d7 --- /dev/null +++ b/docs/changes/newsfragments/ZNLE_addition.txt @@ -0,0 +1 @@ +Enabled use of ZNLE R&S VNA by recognizing the model name in RohdeSchwarzZNBBase, and creating an ZNLE class as an alias \ No newline at end of file From ae101f2e87e1e490d71be5f93ad304239be6822c Mon Sep 17 00:00:00 2001 From: TNO-Selene Date: Wed, 15 Jan 2025 13:37:17 +0100 Subject: [PATCH 3/7] Silly file renaming --- .../newsfragments/{ZNLE_addition.txt => 6672.improved_driver} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/changes/newsfragments/{ZNLE_addition.txt => 6672.improved_driver} (100%) diff --git a/docs/changes/newsfragments/ZNLE_addition.txt b/docs/changes/newsfragments/6672.improved_driver similarity index 100% rename from docs/changes/newsfragments/ZNLE_addition.txt rename to docs/changes/newsfragments/6672.improved_driver From 01ea4568252750abf18dbd5c1c2dea9c76899662 Mon Sep 17 00:00:00 2001 From: TNO-Selene Date: Wed, 15 Jan 2025 13:42:24 +0100 Subject: [PATCH 4/7] Update class docstring --- src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py b/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py index 69021aba9b7..1bb0fd1236f 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/ZNB.py @@ -1027,10 +1027,10 @@ def _get_timeout(self) -> float: class RohdeSchwarzZNBBase(VisaInstrument): """ - Base class for QCoDeS driver for the Rohde & Schwarz ZNB8 and ZNB20 - virtual network analyser. It can probably be extended to ZNB4 and 40 - without too much work. This class should not be instantiated directly - the RohdeSchwarzZNB8 and RohdeSchwarzZNB20 should be used instead. + Base class for QCoDeS driver for the Rohde & Schwarz + ZNB4, ZNB8, ZNB20, ZNB40, ZNLE3, ZNLE4, ZNLE6, ZNLE14 and ZNLE18. + This class should not be instantiated directly + the ZNB and ZNLE should be used instead. Requires FrequencySweep parameter for taking a trace From 031b80763d08bc75aa20a3546f60af79eb059c2d Mon Sep 17 00:00:00 2001 From: FKMalina Date: Fri, 17 Jan 2025 10:59:50 +0100 Subject: [PATCH 5/7] Individual classes for all ZNLE models --- ...2.improved_driver => 6796.improved_driver} | 2 +- .../instrument_drivers/rohde_schwarz/ZNLE.py | 4 -- .../rohde_schwarz/__init__.py | 12 +++++ .../rohde_schwarz/_rohde_schwarz_znle.py | 48 +++++++++++++++++++ 4 files changed, 61 insertions(+), 5 deletions(-) rename docs/changes/newsfragments/{6672.improved_driver => 6796.improved_driver} (52%) delete mode 100644 src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py create mode 100644 src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py diff --git a/docs/changes/newsfragments/6672.improved_driver b/docs/changes/newsfragments/6796.improved_driver similarity index 52% rename from docs/changes/newsfragments/6672.improved_driver rename to docs/changes/newsfragments/6796.improved_driver index 96324df88d7..a65fa7993c4 100644 --- a/docs/changes/newsfragments/6672.improved_driver +++ b/docs/changes/newsfragments/6796.improved_driver @@ -1 +1 @@ -Enabled use of ZNLE R&S VNA by recognizing the model name in RohdeSchwarzZNBBase, and creating an ZNLE class as an alias \ No newline at end of file +Enabled use of ZNLE R&S VNA by recognizing the model name in RohdeSchwarzZNBBase, and creating an ZNLE## class as an alias diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py b/src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py deleted file mode 100644 index c41f7a040e5..00000000000 --- a/src/qcodes/instrument_drivers/rohde_schwarz/ZNLE.py +++ /dev/null @@ -1,4 +0,0 @@ -from .ZNB import RohdeSchwarzZNBBase - -class ZNLE(RohdeSchwarzZNBBase): - pass diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py b/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py index b7e26083897..759b9e16dda 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/__init__.py @@ -1,3 +1,10 @@ +from ._rohde_schwarz_znle import ( + RohdeSchwarzZNLE3, + RohdeSchwarzZNLE4, + RohdeSchwarzZNLE6, + RohdeSchwarzZNLE14, + RohdeSchwarzZNLE18, +) from .Rohde_Schwarz_ZNB8 import RohdeSchwarzZNB8 from .Rohde_Schwarz_ZNB20 import RohdeSchwarzZNB20 from .RTO1000 import ( @@ -17,4 +24,9 @@ "RohdeSchwarzZNB20", "RohdeSchwarzZNBBase", "RohdeSchwarzZNBChannel", + "RohdeSchwarzZNLE3", + "RohdeSchwarzZNLE4", + "RohdeSchwarzZNLE6", + "RohdeSchwarzZNLE14", + "RohdeSchwarzZNLE18", ] diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py new file mode 100644 index 00000000000..ab865a31ae0 --- /dev/null +++ b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py @@ -0,0 +1,48 @@ +# Ensuring backwards compatibility + +from .ZNB import RohdeSchwarzZNBBase + + +class RohdeSchwarzZNLE3(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE3 + + """ + + pass + + +class RohdeSchwarzZNLE4(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE4 + + """ + + pass + + +class RohdeSchwarzZNLE6(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE6 + + """ + + pass + + +class RohdeSchwarzZNLE14(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE14 + + """ + + pass + + +class RohdeSchwarzZNLE18(RohdeSchwarzZNBBase): + """ + QCoDeS driver for Rohde & Schwarz ZNLE18 + + """ + + pass From 744e306b91d2be9892ac31dd04c2013ecfb7e6ec Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Mon, 27 Jan 2025 11:01:18 +0100 Subject: [PATCH 6/7] Remove comment --- .../instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py index ab865a31ae0..8bb0d0854c7 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py @@ -1,4 +1,3 @@ -# Ensuring backwards compatibility from .ZNB import RohdeSchwarzZNBBase From c1696fb6139f673578f5c1e501e1985b81b989dc Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Mon, 27 Jan 2025 11:07:24 +0100 Subject: [PATCH 7/7] Fix formatting --- .../instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py index 8bb0d0854c7..6846d86a6bc 100644 --- a/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py +++ b/src/qcodes/instrument_drivers/rohde_schwarz/_rohde_schwarz_znle.py @@ -1,4 +1,3 @@ - from .ZNB import RohdeSchwarzZNBBase