diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-14 01:32:27 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-14 01:32:27 -0400 |
commit | b97a7cd6e5c0d8b74333bce9464790bbe391ccd6 (patch) | |
tree | 328d988fc0b00e2fda4e9ecd1983e85463310052 /examples | |
parent | 4da1432479022c9f1c8c2d7cccb5a39410ce496c (diff) | |
download | qolab-b97a7cd6e5c0d8b74333bce9464790bbe391ccd6.tar.gz qolab-b97a7cd6e5c0d8b74333bce9464790bbe391ccd6.zip |
black formatter
Diffstat (limited to 'examples')
-rw-r--r-- | examples/scope_sds1104x.py | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/examples/scope_sds1104x.py b/examples/scope_sds1104x.py index c5c890f..7b9c5f3 100644 --- a/examples/scope_sds1104x.py +++ b/examples/scope_sds1104x.py @@ -1,19 +1,18 @@ import pyvisa from qolab.hardware.scope import SDS1104X -if __name__ == '__main__': +if __name__ == "__main__": print("Testing SDS1104X") rm = pyvisa.ResourceManager() - print(rm.list_resources()) - instr=rm.open_resource('TCPIP::192.168.0.61::INSTR') + print(rm.list_resources()) + instr = rm.open_resource("TCPIP::192.168.0.61::INSTR") scope = SDS1104X(instr) - print(f'ID: {scope.idn}') - print(f'Ch1 mean: {scope.mean(1)}') - print(f'Ch1 available points: {scope.getAvailableNumberOfPoints(1)}') - 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)}') - ch1 = scope.getTrace(1) + print(f"ID: {scope.idn}") + print(f"Ch1 mean: {scope.mean(1)}") + print(f"Ch1 available points: {scope.getAvailableNumberOfPoints(1)}") + 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)}") + ch1 = scope.getTrace(1) ch1.plot() - |