diff options
Diffstat (limited to 'qolab/hardware')
-rw-r--r-- | qolab/hardware/scope/sds1104x.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/qolab/hardware/scope/sds1104x.py b/qolab/hardware/scope/sds1104x.py index c7de350..c1ff7b7 100644 --- a/qolab/hardware/scope/sds1104x.py +++ b/qolab/hardware/scope/sds1104x.py @@ -141,18 +141,23 @@ class SDS1104X(ScopeSCPI): if Npnts is None and sparsing is None: # using channel 1 as reference Npnts = self.getAvailableNumberOfPoints(1) - t = np.arange(Npnts) / sampleRate * sparsing; - t = t - timePerDiv * self.horizDivOnScreen/2 - trigDelay + tval = np.arange(Npnts) / sampleRate * sparsing; + tval = tval - timePerDiv * self.horizDivOnScreen/2 - trigDelay + t = Trace('time') + t.values = tval + t.unit = 'S' + t.label = 'time' + t.attributes['timePerDiv'] = timePerDiv + t.attributes['trigDelay'] = trigDelay + t.attributes['SampleRate'] = sampleRate + t.attributes['sparsing'] = sparsing return(t) 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 = TraceXY( f'Ch{chNum}' ) - tr.x.label = 'Time' - tr.x.unit = 'S' - tr.x.values = t - tr.y.descr = f'Ch{chNum}' + tr.x = t tr.y = wfVoltage return( tr ) |