aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-03 13:14:48 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-03 13:14:48 -0500
commit2cd2d1ba131cf885e0534cec7f0504836f5b3d4b (patch)
tree545fb1507523fd5d087199915eaab2a5bc342839 /qolab/hardware
parent65a220c30593c86cc2ea4291b794196146880e9d (diff)
downloadpyExpControl-2cd2d1ba131cf885e0534cec7f0504836f5b3d4b.tar.gz
pyExpControl-2cd2d1ba131cf885e0534cec7f0504836f5b3d4b.zip
redid Trace(s) infrastructure
Diffstat (limited to 'qolab/hardware')
-rw-r--r--qolab/hardware/scope/sds1104x.py17
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 )