aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-13 23:04:59 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-13 23:04:59 -0400
commitc531ad11cf78c03787f805bd4f9a2ab1963a0532 (patch)
treeed01d67cbb41444d14cf85332c2ad60d1970a877 /qolab/hardware
parent2857fd0820cc6277fac1a5c93b9b75551f61ad1e (diff)
downloadqolab-c531ad11cf78c03787f805bd4f9a2ab1963a0532.tar.gz
qolab-c531ad11cf78c03787f805bd4f9a2ab1963a0532.zip
better doc string
Diffstat (limited to 'qolab/hardware')
-rw-r--r--qolab/hardware/power_supply/__init__.py24
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)