diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 20:56:22 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 20:56:22 -0400 |
commit | b0b3de86c06beefbde862a9f17edc75d51e7d8b0 (patch) | |
tree | db2eb38ee546f679443cd3f524a510f70cc2a6b9 /qolab/hardware/scope/sds2304x.py | |
parent | a10370b893237e31f389ad75cae8c7de53ad1b57 (diff) | |
download | qolab-b0b3de86c06beefbde862a9f17edc75d51e7d8b0.tar.gz qolab-b0b3de86c06beefbde862a9f17edc75d51e7d8b0.zip |
black format
Diffstat (limited to 'qolab/hardware/scope/sds2304x.py')
-rw-r--r-- | qolab/hardware/scope/sds2304x.py | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/qolab/hardware/scope/sds2304x.py b/qolab/hardware/scope/sds2304x.py index ae9ed70..d337384 100644 --- a/qolab/hardware/scope/sds2304x.py +++ b/qolab/hardware/scope/sds2304x.py @@ -8,24 +8,29 @@ from qolab.hardware.scpi import response2numStr class SDS2304X(SDS1104X): - """ Siglent SDS2304x scope """ - vertDivOnScreen = 8 # unlike SDS1104X, number of divisions matches what is seen on the screen + """Siglent SDS2304x scope""" + + # unlike SDS1104X, number of divisions matches what is seen on the screen + vertDivOnScreen = 8 horizDivOnScreen = 10 + def __init__(self, resource, *args, **kwds): super().__init__(resource, *args, **kwds) - self.config['Device model'] = 'SDS2304X' - self.resource.read_termination='\n' + self.config["Device model"] = "SDS2304X" + self.resource.read_termination = "\n" self.numberOfChannels = 4 - self.maxRequiredPoints = 1000; # desired number of points per channel, can return twice more - + self.maxRequiredPoints = 1000 + # desired number of points per channel, can return twice more @BasicInstrument.tsdb_append def getTimePerDiv(self): - qstr = 'TDIV?' + qstr = "TDIV?" rstr = self.query(qstr) # Siglent claims that this model should have same commands as SDS1104X - # however response is different, for example we got '2.00E-08S' instead 'TDIV 2.00E-08S' - # expected reply to query: '2.00E-08S' - prefix, numberString, unit = response2numStr(rstr, firstSeparator=None, unit='S') - return(float(numberString)) - + # However response is different. + # For example we got '2.00E-08S' instead 'TDIV 2.00E-08S' + # expected reply to query: '2.00E-08S' + prefix, numberString, unit = response2numStr( + rstr, firstSeparator=None, unit="S" + ) + return float(numberString) |