taurus taurus

Previous topic

User’s Guide

Next topic

Getting started

This Page

Introduction

taurus was originally conceived as a library for connecting client side applications (CLIs and GUIs) to Tango device servers.

Note

More recently, the scope of Taurus has been broadened and it is moving towards supporting pluggins for other control systems (e.g. Epics, Spec...). While many concepts of Taurus Design are heavily influenced by the Tango philosophy, the goal is to eventually provide a control-system agnostic API allowing different control systems to be used even simultaneously. Nevertheless, due to its Tango roots, this documentation may assume that you are using Tango.

Taurus was developed within the Sardana project, but since it has being found to be useful for other projects not related to Sardana, it has been moved to a separate project (although both projects are kept in sync and share most of their developers).

For its Tango interface, Taurus uses PyTango which is a python binding for the Tango library. It provides an abstraction layer that allows Tango to be accessed in a pythonic, object oriented way. For the GUI part, taurus is built on top of the graphical library PyQt which is a python binding for Qt.

The goals of this library are:
  • provide a simple Tango (and other control systems) API to the end-user application
  • speed up development of tango (and other control systems) based applications
  • provide a standardized look-and-feel

For example, to display the values of four attributes (state, position, velocity, acceleration) of a device (motor/icepap/01):

import sys
from taurus.external.qt import Qt
from taurus.qt.qtgui.panel import TaurusForm
from taurus.qt.qtgui.application import TaurusApplication

app = TaurusApplication(sys.argv)

attrs = [ 'state', 'position', 'velocity', 'acceleration' ]
model = [ 'motor/icepap/01/%s' % attr for attr in attrs ]

w = TaurusForm()
w.model = model
w.show()
sys.exit(app.exec_())
../_images/taurusform_example01.png

The generated GUI by the above code

The above example can even be achieved even without typing any code:

% cd taurus/qt/qtgui/panel
% python taurusform.py motor/icepap/01/state motor/icepap/01/position motor/icepap/01/velocity

In many aspects, taurus follows the same approach as the tango java application toolkit: Tango ATK. If you know ATK you will find many things in taurus familiar.

Throughout the documentation we will assume that you have a basic knowledge of Tango/PyTango and Qt/PyQt.

Although taurus is written primarily in pure python, it makes heavy use of PyTango, numpy, PyQt and PyQwt to provide good performance even when large amounts of data are involved.

taurus is designed with the philosophy that you should be able to create simple applications that are able to connect to tango servers with just a few lines of code or even with no code at all!

The concepts were not born from scratch. It is not our intention to reinvent the way applications are written. Many of the concepts were borrowed from the existing java tango library called ATK. If you have used ATK before you will find many concepts familiar.

../_images/taurus_layers.png

The taurus library provides a core module that does not depend on PyQt and which is in charge of abstracting the lower level comunication with the control system (taurus core tutorial). On top of the core, the qt module provides a collection of widgets that can be used inside any PyQt based GUI (Examples). Recently, the proof-of-concept web module is being implemented for providing web widgets.