From 8d768c812daaf6e6d519d25494973e27643f7109 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sat, 20 Jul 2024 23:52:38 -0400 Subject: populate channle config --- qolab/hardware/scope/rigolds1054z.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'qolab/hardware/scope/rigolds1054z.py') diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py index 177f72a..924ad33 100644 --- a/qolab/hardware/scope/rigolds1054z.py +++ b/qolab/hardware/scope/rigolds1054z.py @@ -173,7 +173,20 @@ class RigolDS1054z(ScopeSCPI): to the "Vertical Reference Position" in the Y direction. : the vertical reference position in the Y direction. """ - availableNpnts = int(preamble[2]) + rawChanCfg = { + 'format': int(preamble[0]), + 'type': int(preamble[1]), + 'availableNpnts': int(preamble[2]), + 'Navrg': int(preamble[3]), + 'xincrement': float(preamble[4]), + 'xorigin': float(preamble[5]), + 'xreference': int(preamble[6]), + 'yincrement': float(preamble[7]), + 'yorigin': int(preamble[8]), + 'yreference': int(preamble[9]), + } + logger.info(f"rawChanCfg: {rawChanCfg}") + availableNpnts = rawChanCfg['availableNpnts'] wfRaw = np.zeros(availableNpnts, dtype=np.uint8) maxreadable = 250_000 # the maximum number of bytes readable in one go chunk_size = 70_000 # unfortunately large chunk size prone to read errors @@ -257,7 +270,7 @@ class RigolDS1054z(ScopeSCPI): ) trRaw.config["unit"] = "Count" trRaw.config["tags"]["Decimate"] = decimate - return (trRaw, availableNpnts, Npnts) + return (trRaw, rawChanCfg) def getWaveform( self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True -- cgit v1.2.3