aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-30 17:13:00 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-30 17:13:00 -0500
commit9ad169045c63e0bc4d54a5e01eab2755cf5aff6f (patch)
tree7e4249bbdfeddc83a5cc6945759755ab35e21169
parentb9714fdd3b6cc044a84493441dfe2ff7723c66f0 (diff)
downloadqolab-9ad169045c63e0bc4d54a5e01eab2755cf5aff6f.tar.gz
qolab-9ad169045c63e0bc4d54a5e01eab2755cf5aff6f.zip
getChanOffset --> getChanVoltageOffset
-rw-r--r--qolab/hardware/scope/__init__.py2
-rw-r--r--qolab/hardware/scope/sds1104x.py6
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 -------------')