aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-26 11:38:11 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-26 11:38:11 -0400
commitc13de53d9aa408652e499ab3ea0807982ea9c0d1 (patch)
treecc373157dd9e58d5e2d92ebaaeafd9c7b69f4ec8 /qolab/hardware
parentd325769c66db0ecf06152eadd39c4f38db7d3b18 (diff)
downloadqolab-c13de53d9aa408652e499ab3ea0807982ea9c0d1.tar.gz
qolab-c13de53d9aa408652e499ab3ea0807982ea9c0d1.zip
Simplified trace return variables for _basic scope and Rigol
Diffstat (limited to 'qolab/hardware')
-rw-r--r--qolab/hardware/scope/_basic.py3
-rw-r--r--qolab/hardware/scope/rigolds1054z.py7
2 files changed, 6 insertions, 4 deletions
diff --git a/qolab/hardware/scope/_basic.py b/qolab/hardware/scope/_basic.py
index c5ccd3f..5cb245d 100644
--- a/qolab/hardware/scope/_basic.py
+++ b/qolab/hardware/scope/_basic.py
@@ -114,12 +114,13 @@ class Scope(BasicInstrument):
self.setRun(False) # stop if currently running
self._waitUntillStop()
# to get synchronous channels
- wfVoltage, rawChanCfg = self.getWaveform(
+ wfVoltage = self.getWaveform(
chNum,
availableNpnts=availableNpnts,
maxRequiredPoints=maxRequiredPoints,
decimate=decimate,
)
+ rawChanCfg = wfVoltage.config["tags"]["rawChanConfig"]
t = self.getTimeTrace(rawChanCfg)
tr = TraceXY(f"Ch{chNum}")
tr.x = t
diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py
index c78b648..01cbae4 100644
--- a/qolab/hardware/scope/rigolds1054z.py
+++ b/qolab/hardware/scope/rigolds1054z.py
@@ -409,7 +409,7 @@ class RigolDS1054z(ScopeSCPI):
trRaw.config["unit"] = "Count"
trRaw.config["tags"]["Decimate"] = decimate
trRaw.config["tags"]["rawChanConfig"] = rawChanCfg
- return (trRaw, rawChanCfg)
+ return trRaw
def getTimeTrace(self, rawChanCfg):
timePerDiv = self.getTimePerDiv()
@@ -440,12 +440,13 @@ class RigolDS1054z(ScopeSCPI):
In short decimate=True is slower but more precise.
"""
- trRaw, rawChanCfg = self.getRawWaveform(
+ trRaw = self.getRawWaveform(
chNum,
availableNpnts=availableNpnts,
maxRequiredPoints=maxRequiredPoints,
decimate=decimate,
)
+ rawChanCfg = trRaw.config["tags"]["rawChanConfig"]
VoltageOffset = self.getChanVoltageOffset(chNum)
VoltsPerDiv = self.getChanVoltsPerDiv(chNum)
tr = trRaw
@@ -458,7 +459,7 @@ class RigolDS1054z(ScopeSCPI):
tr.config["unit"] = "Volt"
tr.config["tags"]["VoltageOffset"] = VoltageOffset
tr.config["tags"]["VoltsPerDiv"] = VoltsPerDiv
- return (tr, rawChanCfg)
+ return tr
if __name__ == "__main__":