devctrl.devices.lamp.impl.bentham_psu_610.BenthamPsu610#
- class BenthamPsu610(serial_number: str, default_current: float, name='Lamp')[source]#
Bases:
LampMethods
Manually add a specific device.
Connect to a Bentham PSU610.
Connect an instance of the device's dummy implementation
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 the current lamp current in amperes
Query the status of the device and return a string describing errors.
Initialize the lamp
Query whether the device is (still) connected
Get a list of all devices for this type.
Start the lamp at a specified time
Reset the lamp burn time counter
Set the lamp current in amperes
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#
- __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#
- _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}
- 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.
- 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
- 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