microscope.controllers.lumencor module

Lumencor Spectra Light Engine.

The implementation here is limited to the Lumencor Spectra III but should be trivial to make it work for other Lumencor light engines. We only need access to other such devices.


The engine is expected to be on the standard mode communications (not legacy). This can be changed via the device web interface.

class microscope.controllers.lumencor.SpectraIIILightEngine(port: str, **kwargs)[source]

Bases: microscope.abc.Controller

Spectra III Light Engine.


port – port name (Windows) or path to port (everything else) to connect to. For example, /dev/ttyS1, COM1, or /dev/cuad1.

The names used on the devices dict are the ones provided by the Spectra engine. These are the colour names in capitals such as ‘BLUE’, ‘NIR’, or ‘VIOLET’.

Not all sources may be turned on simultaneously. To prevent exceeding the capacity of the DC power supply, power consumption is tracked by the Spectra onboard computer. If a set limit is exceeded, either by increasing intensity settings for sources that are already on, or by turning on additional sources, commands will be rejected. To clear the error condition, reduce intensities of sources that are on or turn off additional sources.

property devices

Map of names to the controlled devices.