Skip to content

Commit

Permalink
Fix mistake in resolving root_instrument
Browse files Browse the repository at this point in the history
  • Loading branch information
spauka committed Apr 22, 2024
1 parent 093e7bb commit 1d9d958
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/qcodes/instrument_drivers/Keysight/Keysight_N9030B.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
}
opt: str | None = None
for hw_opt_for_max_freq in self._valid_max_freq:
if hw_opt_for_max_freq in self.root_instrument._options():
if hw_opt_for_max_freq in self.root_instrument.options():
opt = hw_opt_for_max_freq
assert opt is not None
self._max_freq = self._valid_max_freq[opt]
Expand Down Expand Up @@ -349,7 +349,7 @@ def _get_data(self, trace_num: int) -> ParamRawDataType:
"""
Gets data from the measurement.
"""
root_instr = self.instrument.root_instrument
root_instr = self.root_instrument
# Check if we should run a new sweep
auto_sweep = root_instr.auto_sweep()

Expand Down Expand Up @@ -426,7 +426,7 @@ def __init__(self, parent: KeysightN9030B, name: str, *arg: Any, **kwargs: Any):
}
opt: str | None = None
for hw_opt_for_max_freq in self._valid_max_freq:
if hw_opt_for_max_freq in self.root_instrument._options():
if hw_opt_for_max_freq in self.root_instrument.options():
opt = hw_opt_for_max_freq
assert opt is not None
self._max_freq = self._valid_max_freq[opt]
Expand Down Expand Up @@ -543,7 +543,7 @@ def _get_data(self, trace_num: int) -> ParamRawDataType:
"""
Gets data from the measurement.
"""
root_instr = self.instrument.root_instrument
root_instr = self.root_instrument
measurement = root_instr.measurement()
raw_data = root_instr.visa_handle.query_binary_values(
f":READ:{measurement}1?",
Expand Down Expand Up @@ -663,9 +663,8 @@ def __init__(self, name: str, address: str, **kwargs: Any) -> None:
# allow this value to be varied. Retained for backwards compatibility.
self.add_parameter(
name="format",
get_cmd=None,
get_cmd=lambda: "real64",
set_cmd=False,
initial_value="real64",
docstring="Sets up format of data received",
)
# Set default format on initialisation
Expand Down

0 comments on commit 1d9d958

Please sign in to comment.