From 2cd2d1ba131cf885e0534cec7f0504836f5b3d4b Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 3 Dec 2021 13:14:48 -0500 Subject: redid Trace(s) infrastructure --- qolab/hardware/scope/sds1104x.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'qolab/hardware/scope') diff --git a/qolab/hardware/scope/sds1104x.py b/qolab/hardware/scope/sds1104x.py index f77883d..c310e51 100644 --- a/qolab/hardware/scope/sds1104x.py +++ b/qolab/hardware/scope/sds1104x.py @@ -4,7 +4,7 @@ Created by Eugeniy E. Mikhailov 2021/11/29 from qolab.hardware.scope import ScopeSCPI from qolab.hardware.scpi import response2numStr -from qolab.data.trace import Trace +from qolab.data.trace import TraceXY import numpy as np class SDS1104X(ScopeSCPI): @@ -140,13 +140,14 @@ class SDS1104X(ScopeSCPI): def getTrace(self, chNum, availableNpnts=None, maxRequiredPoints=None): wfVoltage, availableNpnts = self.getWaveform( chNum, availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints) t = self.getTimeTrace(availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints) - tr = Trace( f'Ch{chNum}' ) - tr.xlabel = 'Time' - tr.xunit = 'S' - tr.ylabel = 'Voltage' - tr.yunit = 'V' - tr.x = t - tr.y = wfVoltage + tr = TraceXY( f'Ch{chNum}' ) + tr.x.label = 'Time' + tr.x.unit = 'S' + tr.y.descr = f'Ch{chNum}' + tr.y.label = 'Voltage' + tr.y.unit = 'V' + tr.x.values = t + tr.y.values = wfVoltage return( tr ) -- cgit v1.2.3