11-14 March 2013
Saas Fee
Europe/Zurich timezone

rootpy: Pythonic ROOT

Mar 13, 2013, 5:45 PM
Schweizerhof (Saas Fee)


Saas Fee


Noel Dawe (SFU Simon Fraser University (CA))


Python has become the language of choice for high-level applications where fast prototyping and efficient development are important, while glueing together low-level libraries for performance-critical tasks. The PyROOT bindings introduced ROOT into the Python arena, however, interacting with ROOT in Python should not "feel" like you are writing C++. Python also offers a multitude of powerful packages such as SciPy, NumPy, IPython, matplotlib, and PyTables, but a suitable interface between them and ROOT has been lacking. One is left pondering the dilemma of using ROOT or alternatives developed by the Python community. What if it was possible to use the best of both worlds? The rootpy project is a growing community-driven initiative led by several developers aiming to provide a more pythonic interface with ROOT on top of the existing PyROOT bindings. rootpy takes advantage of Python's dynamic nature and introspective capabilities to expose more intuitive histogram classes. Plottable objects have properties that alias the ROOT getters and setters, and now optionally accept descriptive strings such as color names. rootpy also provides an interface with matplotlib allowing users to draw ROOT histograms with this popular plotting library if desired. Other major features include the ability to redirect ROOT error messages through Python's logging system, optionally turning them into Python exceptions. The related root_numpy library can efficiently convert ROOT TTrees into structured NumPy arrays. See rootpy and all related packages at http://github.com/rootpy.

Primary author

Noel Dawe (SFU Simon Fraser University (CA))

Presentation materials