Skip to content

Commit 7b5a150

Browse files
committed
Merge branch 'feature/tektronix-dpo' into feature/tektronix-combined
2 parents 806d041 + e1caa50 commit 7b5a150

File tree

3 files changed

+93
-26
lines changed

3 files changed

+93
-26
lines changed

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ comm==0.2.3
5454
# ipywidgets
5555
contourpy==1.3.3
5656
# via matplotlib
57-
coverage==7.13.3
57+
coverage==7.13.4
5858
# via
5959
# qcodes (pyproject.toml)
6060
# pytest-cov
@@ -102,7 +102,7 @@ h5py==3.15.1
102102
# qcodes-loop
103103
hickle==5.0.3
104104
# via qcodes-loop
105-
hypothesis==6.151.5
105+
hypothesis==6.151.6
106106
# via qcodes (pyproject.toml)
107107
idna==3.11
108108
# via requests
@@ -262,13 +262,13 @@ pandas-stubs==3.0.0.260204
262262
# via qcodes (pyproject.toml)
263263
pandocfilters==1.5.1
264264
# via nbconvert
265-
parso==0.8.5
265+
parso==0.8.6
266266
# via jedi
267267
partd==1.4.2
268268
# via dask
269269
pathspec==1.0.4
270270
# via mypy
271-
pillow==12.1.0
271+
pillow==12.1.1
272272
# via
273273
# qcodes (pyproject.toml)
274274
# matplotlib
@@ -453,7 +453,7 @@ traitlets==5.14.3
453453
# nbsphinx
454454
types-jsonschema==4.26.0.20260202
455455
# via qcodes (pyproject.toml)
456-
types-networkx==3.6.1.20251220
456+
types-networkx==3.6.1.20260210
457457
# via qcodes (pyproject.toml)
458458
types-pytz==2025.2.0.20251108
459459
# via pandas-stubs

src/qcodes/instrument_drivers/tektronix/AWG70000A.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import xml.etree.ElementTree as ET
99
import zipfile as zf
1010
from functools import partial
11-
from typing import TYPE_CHECKING, Any, Self
11+
from typing import TYPE_CHECKING, Any, Literal, Self
1212

1313
import numpy as np
1414
import numpy.typing as npt
@@ -191,7 +191,7 @@ def __init__(
191191
if channel not in list(range(1, num_channels + 1)):
192192
raise ValueError("Illegal channel value.")
193193

194-
self.state: Parameter = self.add_parameter(
194+
self.state: Parameter[int, Self] = self.add_parameter(
195195
"state",
196196
label=f"Channel {channel} state",
197197
get_cmd=f"OUTPut{channel}:STATe?",
@@ -201,7 +201,7 @@ def __init__(
201201
)
202202
"""Channel State: (OFF: 0, ON: 1)"""
203203

204-
self.hold: Parameter = self.add_parameter(
204+
self.hold: Parameter[Literal["FIRST", "ZERO"], Self] = self.add_parameter(
205205
"hold",
206206
label=f"Channel {channel} hold value",
207207
get_cmd=f"OUTPut{channel}:WVALUE:ANALOG:STATE?",

src/qcodes/instrument_drivers/tektronix/DPO7200xx.py

Lines changed: 85 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,7 @@ def __init__(
826826
sequence, a new single sequence acquisition will be started. If the last acquisition
827827
was continuous, a new continuous acquisition will be started.
828828
829-
Args:
830-
state: 'ON', 'OFF', 'RUN', or 'STOP'
829+
State can be 'ON', 'OFF', 'RUN', or 'STOP'.
831830
832831
"""
833832

@@ -873,7 +872,7 @@ def __init__(
873872
super().__init__(parent, name, **kwargs)
874873
self._identifier = "B" if delayed_trigger else "A"
875874

876-
trigger_types = ["EDGE", "edge", "logic", "pulse"]
875+
trigger_types = ["edge", "logic", "pulse"]
877876
if self._identifier == "A":
878877
trigger_types.extend(
879878
["video", "i2c", "can", "spi", "communication", "serial", "rs232"]
@@ -935,7 +934,10 @@ def __init__(
935934
vals=Enum(*edge_couplings),
936935
get_parser=str.lower,
937936
)
938-
"""Trigger edge coupling: 'ac', 'dc', 'hfrej', 'lfrej', 'noiserej', 'atrigger'"""
937+
"""Trigger edge coupling for A and B triggers:
938+
Trigger A: 'ac', 'dc', 'hfrej', 'lfrej', 'noiserej'
939+
Trigger B: 'ac', 'dc', 'hfrej', 'lfrej', 'noiserej', 'atrigger'
940+
"""
939941

940942
self.edge_slope: Parameter = self.add_parameter(
941943
"edge_slope",
@@ -1220,19 +1222,10 @@ def reset(self) -> None:
12201222

12211223
class TektronixDPOMeasurementImmediate(InstrumentChannel):
12221224
"""
1223-
The cursor submodule allows you to set and retrieve
1224-
information regarding the cursor type, state, and
1225-
positions. The cursor can be used to measure
1226-
voltage and time differences between two points on
1227-
the waveform display.
1228-
1229-
Methods:
1230-
- function: Set or get the cursor type (e.g., horizontal bars, vertical bars, etc.)
1231-
- state: Set or get the cursor state (ON or OFF)
1232-
- x1: Set or get the x1 position of the cursor (in seconds)
1233-
- x2: Set or get the x2 position of the cursor (in seconds)
1234-
- y1: Set or get the y1 position of the cursor (in Volts)
1235-
- y2: Set or get the y2 position of the cursor (in Volts)
1225+
The measurement commands let you specify an additional measurement, IMMed. The immediate measurement
1226+
has no front panel equivalent. Immediate measurements are never displayed.
1227+
Because they are computed only when needed, immediate measurements slow the
1228+
waveform update rate less than displayed measurements.
12361229
12371230
"""
12381231

@@ -1250,42 +1243,116 @@ def __init__(
12501243
set_cmd="MEASUrement:GATing {}",
12511244
vals=Enum("ON", "OFF", "ZOOM1", "ZOOM2", "ZOOM3", "ZOOM4", "CURSOR"),
12521245
)
1246+
"""Gating for the immediate measurement. Gating allows you to specify a subset of the waveform
1247+
to be measured. When gating is on, the measurement is performed only on the portion of the waveform
1248+
defined by the gate. The gate can be defined by zooming in on a portion of
1249+
the waveform and selecting one of the zoom gates (ZOOM1, ZOOM2, ZOOM3, ZOOM4), or by using the
1250+
cursor gate (CURSOR), which uses the horizontal positions of the cursors to define the gate.
1251+
"""
1252+
12531253
self.source1: Parameter = self.add_parameter(
12541254
"source1",
12551255
get_cmd="MEASUrement:IMMed:SOUrce1?",
12561256
set_cmd="MEASUrement:IMMed:SOUrce1 {}",
12571257
vals=Enum(*TektronixDPOWaveform.valid_identifiers),
12581258
)
1259+
"""Source 1 for the immediate measurement:
1260+
CH1, CH2, CH3, CH4, MATH1, MATH2, MATH3, MATH4,
1261+
REF1, REF2, REF3, REF4, HISTogram"""
12591262

12601263
self.source2: Parameter = self.add_parameter(
12611264
"source2",
12621265
get_cmd="MEASUrement:IMMed:SOUrce2?",
12631266
set_cmd="MEASUrement:IMMed:SOUrce2 {}",
12641267
vals=Enum(*TektronixDPOWaveform.valid_identifiers),
12651268
)
1269+
"""Source 2 for the immediate measurement. Source2 measurements only apply
1270+
to phase and delay measurement types, which require both a target (Source1)
1271+
and reference (Source2) source.
1272+
CH1, CH2, CH3, CH4, MATH1, MATH2, MATH3, MATH4,
1273+
REF1, REF2, REF3, REF4
1274+
"""
12661275

12671276
self.type: Parameter = self.add_parameter(
12681277
"type",
12691278
get_cmd="MEASUrement:IMMed:TYPE?",
12701279
set_cmd="MEASUrement:IMMed:TYPE {}",
12711280
vals=Enum(
1281+
"ACRMS",
1282+
"AMPlitude",
1283+
"AREa",
1284+
"BURst",
1285+
"CARea",
1286+
"CMEan",
1287+
"CRMs",
1288+
"DELay",
1289+
"DISTDUty",
1290+
"EXTINCTDB",
1291+
"EXTINCTPCT",
1292+
"EXTINCTRATIO",
1293+
"EYEHeight",
1294+
"EYEWIdth",
1295+
"FALL",
1296+
"FREQuency",
1297+
"HIGH",
1298+
"HITs",
1299+
"LOW",
1300+
"MAXimum",
12721301
"MEAN",
1302+
"MEDian",
1303+
"MINImum",
1304+
"NCROss",
1305+
"NDUty",
1306+
"NOVershoot",
1307+
"NWIdth",
1308+
"PBASe",
1309+
"PCROss",
1310+
"PCTCROss",
1311+
"PDUty",
1312+
"PEAKHits",
1313+
"PERIod",
1314+
"PHAse",
1315+
"PK2Pk",
1316+
"PKPKJitter",
1317+
"PKPKNoise",
1318+
"POVershoot",
1319+
"PTOP",
1320+
"PWIdth",
1321+
"QFACtor",
1322+
"RISe",
1323+
"RMS",
1324+
"RMSJitter",
1325+
"RMSNoise",
1326+
"SIGMA1",
1327+
"SIGMA2",
1328+
"SIGMA3",
1329+
"SIXSigmajit",
1330+
"SNRatio",
1331+
"STDdev",
1332+
"UNDEFINED",
1333+
"WAVEFORMS",
12731334
),
12741335
get_parser=str.lower,
12751336
)
1276-
"""Cursor Type [OFF, HBARS, VBARS, SCREEN, WAVEFORM]"""
1337+
"""
1338+
Immediate measurement type
1339+
Please see page 2-547 of the programmers manual for a detailed description of these arguments.
1340+
https://download.tek.com/manual/MSO-DPO5000-B-DPO7000-C-DPO70000-B-C-D-DX-DSA70000-B-C-D-and-MSO70000-C-DX-_2.pdf
1341+
"""
12771342

12781343
self.units: Parameter = self.add_parameter(
12791344
"units",
12801345
get_cmd="MEASUrement:IMMed:UNITS?",
12811346
get_parser=strip_quotes,
12821347
)
1348+
"""Units of the immediate measurement"""
12831349

12841350
self.value: Parameter = self.add_parameter(
12851351
"value",
12861352
get_cmd="MEASUrement:IMMed:VALue?",
12871353
get_parser=float,
12881354
)
1355+
"""The value of the immediate measurement"""
12891356

12901357

12911358
class TektronixDPOCursor(InstrumentChannel):

0 commit comments

Comments
 (0)