diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 23:04:59 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-13 23:04:59 -0400 |
commit | c531ad11cf78c03787f805bd4f9a2ab1963a0532 (patch) | |
tree | ed01d67cbb41444d14cf85332c2ad60d1970a877 /qolab | |
parent | 2857fd0820cc6277fac1a5c93b9b75551f61ad1e (diff) | |
download | qolab-c531ad11cf78c03787f805bd4f9a2ab1963a0532.tar.gz qolab-c531ad11cf78c03787f805bd4f9a2ab1963a0532.zip |
better doc string
Diffstat (limited to 'qolab')
-rw-r--r-- | qolab/hardware/power_supply/__init__.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/qolab/hardware/power_supply/__init__.py b/qolab/hardware/power_supply/__init__.py index 5ec4ab9..0ee4fce 100644 --- a/qolab/hardware/power_supply/__init__.py +++ b/qolab/hardware/power_supply/__init__.py @@ -2,7 +2,12 @@ from qolab.hardware.scpi import SCPIinstr from qolab.hardware.basic import BasicInstrument class PowerSupply(BasicInstrument): - # Minimal set of methods to be implemented by a Power Supply + """Base class for a Power Supply. + + Contains minimal set of methods to be implemented by a Power Supply. + + 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' @@ -11,12 +16,19 @@ class PowerSupply(BasicInstrument): self.deviceProperties.update({}) class PowerSupplySCPI(SCPIinstr, PowerSupply): - """ - Do not instantiate directly, use - rm = pyvisa.ResourceManager() - PowerSupplySCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR')) + """SCPI aware power supply. + + Intended to be used as a parent for hardware aware power supplies. + + Example + ------- + + >>> rm = pyvisa.ResourceManager() + >>> PowerSupplySCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR')) + or - PowerSupplySCPI(rm.open_resource('USB0::10893::4354::MY61001869::0::INSTR')) + + >>> PowerSupplySCPI(rm.open_resource('USB0::10893::4354::MY61001869::0::INSTR')) """ def __init__(self, resource, *args, **kwds): SCPIinstr.__init__(self, resource) |