aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-13 23:05:52 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-13 23:05:52 -0400
commitcf53f3ea6101494d9d40e0ab48469046b1bbb2a6 (patch)
tree3ae3a9871ce97dc1dc0bf59989ce545265859146 /qolab/hardware
parentc531ad11cf78c03787f805bd4f9a2ab1963a0532 (diff)
downloadqolab-cf53f3ea6101494d9d40e0ab48469046b1bbb2a6.tar.gz
qolab-cf53f3ea6101494d9d40e0ab48469046b1bbb2a6.zip
black formatter
Diffstat (limited to 'qolab/hardware')
-rw-r--r--qolab/hardware/power_supply/__init__.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/qolab/hardware/power_supply/__init__.py b/qolab/hardware/power_supply/__init__.py
index 0ee4fce..80f5522 100644
--- a/qolab/hardware/power_supply/__init__.py
+++ b/qolab/hardware/power_supply/__init__.py
@@ -1,6 +1,7 @@
from qolab.hardware.scpi import SCPIinstr
from qolab.hardware.basic import BasicInstrument
+
class PowerSupply(BasicInstrument):
"""Base class for a Power Supply.
@@ -8,13 +9,17 @@ class PowerSupply(BasicInstrument):
Intended to be used as a parent for hardware aware power supplies.
"""
+
def __init__(self, *args, **kwds):
BasicInstrument.__init__(self, *args, **kwds)
- self.config['Device type']='PowerSupply'
- self.config['Device model'] = 'Generic Power Supply generator Without Hardware interface'
- self.config['FnamePrefix'] = 'power_supply'
+ self.config["Device type"] = "PowerSupply"
+ self.config[
+ "Device model"
+ ] = "Generic Power Supply generator Without Hardware interface"
+ self.config["FnamePrefix"] = "power_supply"
self.deviceProperties.update({})
+
class PowerSupplySCPI(SCPIinstr, PowerSupply):
"""SCPI aware power supply.
@@ -26,13 +31,15 @@ class PowerSupplySCPI(SCPIinstr, PowerSupply):
>>> rm = pyvisa.ResourceManager()
>>> PowerSupplySCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR'))
- or
+ or
>>> PowerSupplySCPI(rm.open_resource('USB0::10893::4354::MY61001869::0::INSTR'))
"""
+
def __init__(self, resource, *args, **kwds):
SCPIinstr.__init__(self, resource)
PowerSupply.__init__(self, *args, **kwds)
- self.config['DeviceId'] = str.strip(self.idn)
+ self.config["DeviceId"] = str.strip(self.idn)
+
from .keysight_e3612a import KeysightE3612A