diff options
Diffstat (limited to 'qolab/hardware')
-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) |