aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-21 00:12:45 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-21 00:12:45 -0400
commit1351d8d1c4eafd35f123bbd4e964cbe0072b5b33 (patch)
treea1c030948cc7c6ec4cae2f73f86f8f6ad0aef987 /qolab/hardware/scope
parent8d768c812daaf6e6d519d25494973e27643f7109 (diff)
downloadqolab-1351d8d1c4eafd35f123bbd4e964cbe0072b5b33.tar.gz
qolab-1351d8d1c4eafd35f123bbd4e964cbe0072b5b33.zip
raw counts -> voltage
Diffstat (limited to 'qolab/hardware/scope')
-rw-r--r--qolab/hardware/scope/rigolds1054z.py9
1 files changed, 4 insertions, 5 deletions
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