From 1351d8d1c4eafd35f123bbd4e964cbe0072b5b33 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sun, 21 Jul 2024 00:12:45 -0400 Subject: raw counts -> voltage --- qolab/hardware/scope/rigolds1054z.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'qolab/hardware/scope') diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py index 924ad33..6b0a918 100644 --- a/qolab/hardware/scope/rigolds1054z.py +++ b/qolab/hardware/scope/rigolds1054z.py @@ -280,7 +280,7 @@ class RigolDS1054z(ScopeSCPI): In short decimate=True is slower but more precise. """ - trRaw, availableNpnts, Npnts = self.getRawWaveform( + trRaw, rawChanCfg = self.getRawWaveform( chNum, availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints, @@ -289,13 +289,12 @@ class RigolDS1054z(ScopeSCPI): VoltageOffset = self.getChanVoltageOffset(chNum) VoltsPerDiv = self.getChanVoltsPerDiv(chNum) tr = trRaw - tr.values = ( - trRaw.values * VoltsPerDiv * self.vertDivOnScreen / 250 - VoltageOffset - ) + tr.values = (trRaw.values - rawChanCfg['yreference'] - rawChanCfg['yorigin']) * rawChanCfg['yincrement'] + tr.config["unit"] = "Volt" tr.config["tags"]["VoltageOffset"] = VoltageOffset tr.config["tags"]["VoltsPerDiv"] = VoltsPerDiv - return (tr, availableNpnts) + return (tr, rawChanCfg) def getTrace( self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True -- cgit v1.2.3