aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope/rigolds1054z.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-26 11:16:06 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-26 11:16:06 -0400
commite0fb8e1ab81a7ab22d9f18dcda0590ee96102287 (patch)
tree57e640745554c88a3d65633b12c5842e16776a4a /qolab/hardware/scope/rigolds1054z.py
parent49d195da8e5d10cc120e73aa0e078b4dcf7e0650 (diff)
downloadqolab-e0fb8e1ab81a7ab22d9f18dcda0590ee96102287.tar.gz
qolab-e0fb8e1ab81a7ab22d9f18dcda0590ee96102287.zip
refactor basic scope and Rigol so the getTrace is now in the basic class
Diffstat (limited to 'qolab/hardware/scope/rigolds1054z.py')
-rw-r--r--qolab/hardware/scope/rigolds1054z.py25
1 files changed, 1 insertions, 24 deletions
diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py
index 94eed25..598ad4a 100644
--- a/qolab/hardware/scope/rigolds1054z.py
+++ b/qolab/hardware/scope/rigolds1054z.py
@@ -5,7 +5,7 @@ Created by Eugeniy E. Mikhailov 2024/07/18
from qolab.hardware.basic import BasicInstrument
from qolab.hardware.scpi import SCPI_PROPERTY
from ._basic import ScopeSCPI, calcSparsingAndNumPoints
-from qolab.data.trace import Trace, TraceXY
+from qolab.data.trace import Trace
import numpy as np
import scipy.signal
from pyvisa.errors import VisaIOError
@@ -456,29 +456,6 @@ class RigolDS1054z(ScopeSCPI):
tr.config["tags"]["VoltsPerDiv"] = VoltsPerDiv
return (tr, rawChanCfg)
- def getTrace(
- self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True
- ):
- old_run_status = self.getRun()
- if old_run_status: # avoid unnecessary status change
- self.setRun(False) # stop if currently running
- self._waitUntillStop()
- # to get synchronous channels
- wfVoltage, rawChanCfg = self.getWaveform(
- chNum,
- availableNpnts=availableNpnts,
- maxRequiredPoints=maxRequiredPoints,
- decimate=decimate,
- )
- t = self.getTimeTrace(rawChanCfg)
- tr = TraceXY(f"Ch{chNum}")
- tr.x = t
- tr.y = wfVoltage
- # restore scope to the before acquisition mode
- if old_run_status: # avoid unnecessary status change
- self.setRun(old_run_status) # start running if it was old run state
- return tr
-
if __name__ == "__main__":
import pyvisa