Welcome to Autolab’s documentation!

“Forget your instruments, focus on your experiment!”

Autolab is a Python package dedicated to control remotely any laboratory instruments and automate scientific experiments in the most user-friendly way. This package provides a set of standardized drivers for about 50 instruments (for now) which are ready to use, and is open to inputs from the community (new drivers or upgrades of existing ones). The configuration required to communicate with a given instrument (connection type, address, …) can be saved locally to avoid providing it each time. Autolab can also be used either through a Python shell, an OS shell, or a graphical interface.


In this package, the interaction with a scientific instrument can be done through two different objects : the Drivers, or the Devices.

>>> import autolab

>>> laserSource = autolab.get_driver('yenista_TUNICS',connection='VISA',address='GPIB0::12::INSTR')
>>> laserSource.set_wavelength(1550)
>>> laserSource.get_wavelength()

>>> powerMeter = autolab.get_driver('newport_1918C', connection='DLL')
>>> powerMeter.get_power()

>>> stage = autolab.get_driver('newport_XPS', connection='SOCKET')
>>> stage.go_home()
  • The Devices (High-level interface), are an abstraction layer of the low-level interface that provide a simple and straightforward way to communicate with an instrument, through a hierarchy of Modules, Variables and Actions objects.

>>> import autolab

# Create the Device 'my_tunics' defined in 'devices_config.ini'
>>> laserSource = autolab.get_device('my_tunics')
>>> laserSource.wavelength(1550)                        # Set the Variable 'wavelength'
>>> laserSource.wavelength()                            # Read the Variable 'wavelength'

>>> powerMeter = autolab.get_device('my_powermeter')    # Create the Device 'my_powermeter'
>>> powerMeter.power()                                  # Read the Variable 'power'

>>> stage = autolab.get_device('my_stage')              # Create the Device 'my_stage'
>>> stage.home()                                        # Execute the Action 'home'

The user can also interact even more easily with this high-level interface through a user-friendly Graphical User Interface (GUI) which contains three panels: A Control Panel (graphical equivalent of the high-level interface), a Monitor (to monitor the value of a Variable in time) and a Scanner (to scan a Parameter and execute a custom Recipe).


All the Autolab’s features are also available through an OS shell. interface (Windows and Linux) that can be used to perform for instance a quick single-shot operation without opening explicitely a Python shell.

>>> autolab driver -D yenista_TUNICS -C VISA -A GPIB0::12::INSTR -w 1551
>>> autolab device -D my_tunics -e wavelength -v 1551

Table of contents:

Last edit: Feb 10, 2024 for the version 2.0b1