diff options
Diffstat (limited to 'qolab/hardware/scope')
-rw-r--r-- | qolab/hardware/scope/__init__.py | 2 | ||||
-rw-r--r-- | qolab/hardware/scope/sds1104x.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/qolab/hardware/scope/__init__.py b/qolab/hardware/scope/__init__.py index 8c022c4..ff3eb18 100644 --- a/qolab/hardware/scope/__init__.py +++ b/qolab/hardware/scope/__init__.py @@ -23,7 +23,7 @@ class Scope(BasicInstrument): self.deviceProperties = ['SampleRate', 'TimePerDiv', 'TrigDelay', ]; # same is applied to channelProperties but we need setter/getter with channel number # i.e. VoltsPerDiv -> getChanVoltsPerDiv(chNum) and setSampleRate(chNum, value) - self.channelProperties = ['VoltsPerDiv', 'Offset', ] + self.channelProperties = ['VoltsPerDiv', 'VoltageOffset', ] def getTrace(self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True): # Should work with minimal arguments list diff --git a/qolab/hardware/scope/sds1104x.py b/qolab/hardware/scope/sds1104x.py index 4aa5c5e..40ba39a 100644 --- a/qolab/hardware/scope/sds1104x.py +++ b/qolab/hardware/scope/sds1104x.py @@ -135,7 +135,7 @@ class SDS1104X(ScopeSCPI): self.write(cstr) # if out of range, the VAB bit (bit 2) in the STB register to be set - def getChanOffset(self, chNum): + def getChanVoltageOffset(self, chNum): qstr = f'C{chNum}:OFST?' rstr = self.query(qstr) # expected reply to query: 'C1:OFST -1.27E+00V' @@ -207,7 +207,7 @@ class SDS1104X(ScopeSCPI): For decimate use see getRawWaveform. In short decimate=True is slower but more precise. """ trRaw, availableNpnts, Npnts = self.getRawWaveform(chNum, availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints, decimate=decimate) - VoltageOffset = self.getChanOffset(chNum) + VoltageOffset = self.getChanVoltageOffset(chNum) VoltsPerDiv = self.getChanVoltsPerDiv(chNum) tr = trRaw tr.values = trRaw.values * VoltsPerDiv * self.vertDivOnScreen/250 -VoltageOffset @@ -275,7 +275,7 @@ if __name__ == '__main__': print(f'Sample Rate: {scope.getSampleRate()}') print(f'Time per Div: {scope.getTimePerDiv()}') print(f'Ch1 Volts per Div: {scope.getChanVoltsPerDiv(1)}') - print(f'Ch1 Voltage Offset: {scope.getChanOffset(1)}') + print(f'Ch1 Voltage Offset: {scope.getChanVoltageOffset(1)}') print('------ Header start -------------') print(str.join('\n', scope.getHeader())) print('------ Header ends -------------') |