devctrl.devices.monochromator.impl.andor_kymera.Kymera#

class Kymera[source]#

Bases: Monochromator

Controls the Kymera spectrometer placed after the sample.

Methods

add_device

Manually add a specific device.

allow_only_dummy_devices

close_permanent

connect

connect_device

This function should be overridden by device implementations only, and is not intended to be used directly.

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_device_name

get_device_type_name

get_energy_eV

get_resolution_eV

get_resolution_nm

get_status

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

get_wavelength_nm

initialize_camera_permanent

Initializes Kymera with camera specific settings.

initialize_diode_permanent

Initializes Kymera with diode specific settings.

initialize_for_gui

is_connected

Query whether the device is (still) connected

list_devices

Get a list of all devices for this type.

provide_wavelength_axis

Gets the current wavelength axis.

reset

return_parameters

Return device parameters for saving

set_energy_eV

set_resolution_eV

set_resolution_nm

set_wavelength_nm

_CLASS_TYPE = 'implementation'#
__abstractmethods__ = frozenset({})#
__annotations__ = {'_manual_devices': list[str]}#
__del__()[source]#
__dict__ = mappingproxy({'__module__': 'devctrl.devices.monochromator.impl.andor_kymera', '__firstlineno__': 10, '__doc__': '\nControls the Kymera spectrometer placed after the sample.\n', '_CLASS_TYPE': 'implementation', '__init__': <function Kymera.__init__>, 'is_connected': <function Kymera.is_connected>, 'set_wavelength_nm': <function Kymera.set_wavelength_nm>, 'get_wavelength_nm': <function Kymera.get_wavelength_nm>, 'set_resolution_nm': <function Kymera.set_resolution_nm>, 'set_resolution_eV': <function Kymera.set_resolution_eV>, 'get_resolution_nm': <function Kymera.get_resolution_nm>, 'reset': <function Kymera.reset>, '_enumerate_devices': <classmethod(<function Kymera._enumerate_devices>)>, 'connect_device': <classmethod(<function Kymera.connect_device>)>, '__repr__': <function Kymera.__repr__>, 'return_parameters': <function Kymera.return_parameters>, '_Kymera__initialize_permanent': <function Kymera.__initialize_permanent>, 'initialize_for_gui': <function Kymera.initialize_for_gui>, '_Kymera__initialize_core': <function Kymera.__initialize_core>, 'initialize_diode_permanent': <function Kymera.initialize_diode_permanent>, 'initialize_camera_permanent': <function Kymera.initialize_camera_permanent>, '_Kymera__lower_to_center': <function Kymera.__lower_to_center>, 'provide_wavelength_axis': <function Kymera.provide_wavelength_axis>, 'close_permanent': <function Kymera.close_permanent>, '__del__': <function Kymera.__del__>, '__static_attributes__': ('grating', 'grating_widths_nm', 'iStar_horizontal_pixel_count', 'manual_slit', 'slit_width', 'spec', 'wavelength', 'wavelength_axis'), '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '_children': {}, '_manual_devices': ['name=Kymera', 'name=Kymera']})#
__firstlineno__ = 10#
__init__()[source]#
__initialize_core(spec, wavelength, detector_port)#
__initialize_permanent(spec, wavelength, detector_port)#

Baisic initialization valid for both diode and camera. Minimize requests to Kymera to prolong time between crashes.

__lower_to_center(wavelength_low)#

For camera measurements the user sets the high energy/low wavelength side of the wavelength range covered by the grating. This method translates this value to the center value needed for setting in the Kymera.

__module__ = 'devctrl.devices.monochromator.impl.andor_kymera'#
__repr__()[source]#
Returns:

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

__slots__ = ()#
__static_attributes__ = ('grating', 'grating_widths_nm', 'iStar_horizontal_pixel_count', 'manual_slit', 'slit_width', 'spec', 'wavelength', 'wavelength_axis')#
__weakref__#

list of weak references to the object

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

This function should be overridden by device implementations only, and is not intended to be used directly. Instead, use list_devices() to get a list of devices. Use enumerate_devices only directly when you only want to list devices of one specific implementation, i.e., only SR830 Lock-In: SR830._enumerate_devices() :param class_name: The name of the device class

_manual_devices: list[str] = ['name=Kymera', 'name=Kymera']#
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()#
close_permanent(spec)[source]#
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, **kwargs)[source]#

This function should be overridden by device implementations only, and is not intended to be used directly. Instead, use list_devices() to get a list of devices, and pass the selected device type and name to connect() :param device_name: The name of the device class

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_energy_eV() float#
get_resolution_eV() float#
get_resolution_nm()[source]#
get_status() str#

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

get_wavelength_nm() float[source]#
initialize_camera_permanent(wavelength, spec=None)[source]#

Initializes Kymera with camera specific settings.

initialize_diode_permanent(wavelength, spec=None)[source]#

Initializes Kymera with diode specific settings.

initialize_for_gui()[source]#
is_connected() bool[source]#

Query whether the device is (still) connected

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

provide_wavelength_axis(spec)[source]#

Gets the current wavelength axis. Considers calibrations and pixel size to give not-necessarily equally sized wavelength intervals per pixel.

reset()[source]#
return_parameters()[source]#

Return device parameters for saving

Returns a dictionary of parameters relevant for this monochromator device. New parameters to be saved can be added to this method.

Returns:

Dictionary of device parameters with their current values

set_energy_eV(energy_eV)#
set_resolution_eV(resolution_eV)[source]#
set_resolution_nm(resolution_nm)[source]#
set_wavelength_nm(wavelength_nm)[source]#