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 40 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.

_images/scheme.png

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()
1550

>>> powerMeter = autolab.get_driver('my_powermeter')
>>> powerMeter.get_current_power()
156.89e-6

>>> stage = autolab.get_driver('my_stage')
>>> 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'
>>> laserSource = autolab.get_device('yenista_TUNICS',connection='VISA',address='GPIB0::12::INSTR')
>>> laserSource.wavelength(1550)                        # Set the Variable 'wavelength'
>>> laserSource.wavelength()                            # Read the Variable 'wavelength'
1550

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

>>> 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).

_images/scanning.png

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 devices my_tunics.wavelength -v 1551

Table of contents: