diff options
Diffstat (limited to 'qolab/hardware/scope')
-rw-r--r-- | qolab/hardware/scope/_basic.py | 13 | ||||
-rw-r--r-- | qolab/hardware/scope/sds800xhd.py | 20 |
2 files changed, 28 insertions, 5 deletions
diff --git a/qolab/hardware/scope/_basic.py b/qolab/hardware/scope/_basic.py index 9eec8c2..b738a8b 100644 --- a/qolab/hardware/scope/_basic.py +++ b/qolab/hardware/scope/_basic.py @@ -106,7 +106,12 @@ class Scope(BasicInstrument): raise NotImplementedError("getTimeTrace function is not implemented") def getTrace( - self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True + self, + chNum, + availableNpnts=None, + maxRequiredPoints=None, + decimate=True, + fmath=False ): """Get scope trace with time axis set.""" old_run_status = self.getRun() @@ -119,10 +124,14 @@ class Scope(BasicInstrument): availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints, decimate=decimate, + fmath=fmath ) rawChanCfg = wfVoltage.config["tags"]["rawChanConfig"] t = self.getTimeTrace(rawChanCfg) - tr = TraceXY(f"Ch{chNum}") + if fmath: + tr = TraceXY(f"ChF{chNum}") + else: + tr = TraceXY(f"Ch{chNum}") tr.x = t tr.y = wfVoltage # restore scope to the before acquisition mode diff --git a/qolab/hardware/scope/sds800xhd.py b/qolab/hardware/scope/sds800xhd.py index 350d53d..5fe42de 100644 --- a/qolab/hardware/scope/sds800xhd.py +++ b/qolab/hardware/scope/sds800xhd.py @@ -57,7 +57,12 @@ class SDS800XHD(SDS1104X): return float(numberString) def getRawWaveform( - self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True + self, + chNum, + availableNpnts=None, + maxRequiredPoints=None, + decimate=True, + fmath=False ): """ Get raw channel waveform in binary format. @@ -131,7 +136,10 @@ class SDS800XHD(SDS1104X): self.write(f":WAVeform:POINt {Npnts}") # transfer all points trRaw = Trace(f"Ch{chNum}") - self.write(f":WAVeform:SOURce C{chNum}") + if fmath: + self.write(f":WAVeform:SOURce F{chNum}") + else: + self.write(f":WAVeform:SOURce C{chNum}") qstr = ":WAVeform:DATA?" if self.resource.interface_type == InterfaceType.usb: # Setting chunk size to 496 bytes, it seems that SDS sends data @@ -226,7 +234,12 @@ class SDS800XHD(SDS1104X): return preamble def getWaveform( - self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True + self, + chNum, + availableNpnts=None, + maxRequiredPoints=None, + decimate=True, + fmath=False ): """ For decimate use see ``getRawWaveform``. @@ -238,6 +251,7 @@ class SDS800XHD(SDS1104X): availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints, decimate=decimate, + fmath=fmath ) preamble = self.getParsedPreamble() VoltageOffset = preamble["verticalOffset"] |