devctrl.devices.lamp.impl.bentham_psu_610.BenthamPsu610#

class BenthamPsu610(serial_number: str, default_current: float, name='Lamp')[source]#

Bases: Lamp

Methods

add_device

Manually add a specific device.

allow_only_dummy_devices

connect

connect_device

Connect to a Bentham PSU610.

connect_dummy

Connect an instance of the device's dummy implementation

get_base_classes

Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}

get_current_A

Get the current lamp current in amperes

get_device_name

get_device_type_name

get_status

Query the status of the device and return a string describing errors.

initialize

Initialize the lamp

is_connected

Query whether the device is (still) connected

is_on

list_devices

Get a list of all devices for this type.

off

on

preset_start

Start the lamp at a specified time

query

reset_burntime

Reset the lamp burn time counter

run

set_current_A

Set the lamp current in amperes

start

Start the xenon lamp

_CLASS_TYPE = 'implementation'#
__abstractmethods__ = frozenset({})#
__annotations__ = {'_manual_devices': list[str]}#
__dict__ = mappingproxy({'__module__': 'devctrl.devices.lamp.impl.bentham_psu_610', '__firstlineno__': 11, '_CLASS_TYPE': 'implementation', '__init__': <function BenthamPsu610.__init__>, 'on': <function BenthamPsu610.on>, 'start': <function BenthamPsu610.start>, 'off': <function BenthamPsu610.off>, 'reset_burntime': <function BenthamPsu610.reset_burntime>, 'set_current_A': <function BenthamPsu610.set_current_A>, 'get_current_A': <function BenthamPsu610.get_current_A>, '_BenthamPsu610__status': <function BenthamPsu610.__status>, 'is_on': <function BenthamPsu610.is_on>, 'get_status': <function BenthamPsu610.get_status>, 'is_connected': <function BenthamPsu610.is_connected>, 'run': <function BenthamPsu610.run>, 'query': <function BenthamPsu610.query>, 'initialize': <function BenthamPsu610.initialize>, 'preset_start': <function BenthamPsu610.preset_start>, '__repr__': <function BenthamPsu610.__repr__>, '_enumerate_devices': <classmethod(<function BenthamPsu610._enumerate_devices>)>, 'connect_device': <classmethod(<function BenthamPsu610.connect_device>)>, '__static_attributes__': ('default_current', 'name', 'ps_serial_num', 'state'), '__doc__': None, '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '_children': {}, '_manual_devices': ['name=Xenon-Lamp serial_number=32540/2 default_current=5.4000', 'name=Halogen-Lamp serial_number=32540/1 default_current=8.5000', 'name=Xenon-Lamp serial_number=32540/2 default_current=5.4000', 'name=Halogen-Lamp serial_number=32540/1 default_current=8.5000']})#
__firstlineno__ = 11#
__init__(serial_number: str, default_current: float, name='Lamp')[source]#
__module__ = 'devctrl.devices.lamp.impl.bentham_psu_610'#
__repr__() str[source]#
Returns:

The name of the device. If applicable, this should include serial port, GPIB address, etc.

__slots__ = ()#
__static_attributes__ = ('default_current', 'name', 'ps_serial_num', 'state')#
__status()#
__weakref__#

list of weak references to the object

_abc_impl = <_abc._abc_data object>#
_children = {}#
_dummies_only = False#
classmethod _enumerate_devices() list[str][source]#

:note:`Not implemented.`

_manual_devices: list[str] = ['name=Xenon-Lamp serial_number=32540/2 default_current=5.4000', 'name=Halogen-Lamp serial_number=32540/1 default_current=8.5000', 'name=Xenon-Lamp serial_number=32540/2 default_current=5.4000', 'name=Halogen-Lamp serial_number=32540/1 default_current=8.5000']#
classmethod add_device(connect_info)#

Manually add a specific device. The device will show up when list_devices() is called for the device type. Call this from the device class implementation, e.g. use ModelXYZ9000.add_device(‘GPIB:1234:5678’) to add a specific device with a fixed GPIB address. This is useful when automatic discovery is undesired/impossible, either because it is not implemented or it disturbs other devices which can’t handle a identification request. :param cls: The device implementation class :param connect_info: A string argument that is passed to the connect() method of the device implementation, when the device is being connected.

static allow_only_dummy_devices()#
classmethod connect(device_type_name: str, device_name: str | None, **kwargs) Device#
Parameters:
  • device_type_name – The name of the device class

  • device_name – The name of the device class

classmethod connect_device(device_name: str)[source]#

Connect to a Bentham PSU610.

Parameters:

device_name – Device connection string containing ‘serial_number’, ‘default_current’ (in amperes), and optional ‘name’

Returns:

Configured BenthamPsu610 instance

Raises:

ValueError – If required parameters are missing from device_name

classmethod connect_dummy(**kwargs) Device#

Connect an instance of the device’s dummy implementation

classmethod get_base_classes(recurse=True) dict[str, type[Device]]#

Return a flat dictionary of all base classes below this class :param recurse: If True, recursively search for base classes :return: dict of {class name: class}

get_current_A() float[source]#

Get the current lamp current in amperes

Returns:

Current in amperes

classmethod get_device_name() str#
Returns:

The specific type name of the device, e.g., SR830 or Keithly2600

classmethod get_device_type_name() str#
Returns:

The general type name of the device, e.g., Lock-In Amplifier or Voltmeter

get_status() str[source]#

Query the status of the device and return a string describing errors. If everything is ok, empty string must be returned :return: String of device status

initialize()[source]#

Initialize the lamp

Checks if the xenon lamp is switched on. If not, switches it on.

is_connected() bool[source]#

Query whether the device is (still) connected

is_on() bool[source]#
classmethod list_devices() list[tuple[str, str]]#

Get a list of all devices for this type. The list made up of: - Manually added devices - Available devices (those returned by _enumerate_devices) - A dummy device (if a dummy implementation exists) - List of all devices of child classes

Returns:

list of available devices

off()[source]#
on()[source]#
preset_start(hour=6, minute=0)[source]#

Start the lamp at a specified time

Allows for delayed xenon lamp start. Can be used to allow for warmup time in the morning. Maximum delay is 23 hours and 59 minutes.

Parameters:
  • hour – Hour (0-23) to start the lamp

  • minute – Minute (0-59) to start the lamp

query(cmd) str[source]#
reset_burntime()[source]#

Reset the lamp burn time counter

run(cmd)[source]#
set_current_A(current_A)[source]#

Set the lamp current in amperes

Parameters:

current_A – Current in amperes

start()[source]#

Start the xenon lamp

Assumes the lamp is connected to the given power supply. The Bentham TMC300 is also parked to ensure later operation.