diff options
Diffstat (limited to 'qolab/hardware/scope')
-rw-r--r-- | qolab/hardware/scope/sds1104x.py | 17 |
1 files changed, 9 insertions, 8 deletions
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 ) |