From cf53f3ea6101494d9d40e0ab48469046b1bbb2a6 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Sat, 13 Jul 2024 23:05:52 -0400 Subject: black formatter --- qolab/hardware/power_supply/__init__.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'qolab/hardware') 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 -- cgit v1.2.3