A pythonic layer on top of the ROOT framework's PyROOT bindings.
Project description
Documentation is hosted here: rootpy.org and mirrored here: rootpy.github.com/rootpy.
About
rootpy provides a more feature-rich and pythonic interface with the ROOT libraries on top of the existing PyROOT bindings.
More specifically, rootpy provides:
easier manipulation of trees, histograms, graphs, cuts, and TVector/TLorentzVectors. rootpy provides classes that inherit from these ROOT classes and implement the Python arithmetic operators.
an easy way to create and read ROOT TTrees and a mechanism for defining objects and collections of objects whose attributes are TTree branches. You may also decorate TTree objects with additional methods and attributes. See examples/tree.
easy navigation through TFiles. rootpy wraps TFile and implements the natural naming convention so that objects may be retrieved with myFile.someDirectory.treeName, for example.
an interface between ROOT and matplotlib. Don’t like the way your plots look in ROOT? Simply use rootpy to plot your ROOT histograms or graphs with matplotlib instead.
conversion of ROOT TFiles containing TTrees into HDF5 format with PyTables.
conversion of TTrees into NumPy ndarrays and recarrays. Now take advantage of the many statistical and numerical packages that Python offers (NumPy, SciPy, StatsModels, use scikit-learn for machine learning instead of TMVA).
efficient filling of ROOT histograms from NumPy ndarrays.
a framework for parallelizing processes that run over many TTrees.
roosh, a Bash-like shell environment for the ROOT TFile.
Requirements
Python 2.6 or 2.7 (Python 3 is currently not supported, but see this issue for progress)
The following dependencies are optional:
NumPy for speed
matplotlib for plotting
PyTables for HDF5 IO in rootpy.root2tables
rootpy is developed and tested on Linux and Mac.
Getting the Latest Source
Clone the repository with git:
git clone git://github.com/rootpy/rootpy.git
or checkout with svn:
svn checkout http://svn.github.com/rootpy/rootpy
Manual Installation
If you have obtained a copy of rootpy yourself use the setup.py script to install.
To install in your home directory:
python setup.py install --user
To install system-wide (requires root privileges):
sudo python setup.py install
To install optional requirements (matplotlib, NumPy, etc.):
pip install -U -r requirements/[roosh|array|...].txt
Automatic Installation
To install a released version of rootpy use pip.
To install in your home directory:
pip install --user rootpy
To install system-wide (requires root privileges):
sudo pip install rootpy
To install optional requirements (matplotlib, NumPy, etc.):
pip install --user rootpy[array,matplotlib,...]
This requires pip version 1.1 or later.
Post-Installation
If you installed rootpy into your home directory with the –user option above, add ${HOME}/.local/bin to your ${PATH} if it is not there already (put this in your .bashrc):
export PATH=${HOME}/.local/bin${PATH:+:$PATH}
Development
Please post on the rootpy-dev@googlegroups.com list if you have ideas or contributions. Feel free to fork rootpy on GitHub and later submit a pull request.
IRC Channel
See #rootpy on freenode.
IRC is banned at CERN since it reveals your hostname to people in the chatroom, making you interesting to attackers. But you can safely access it through this web link:
http://webchat.freenode.net/?randomnick=1&channels=rootpy&prompt=1
Have Questions or Found a Bug?
Post your questions on stackoverflow.com and use the tag rootpy (this tag does not exist yet, but if you have a reputation of at least 1500 then please create it).
Think you found a bug? Open a new issue here: github.com/rootpy/rootpy/issues.
Also feel free to post questions or follow discussion on the rootpy-users or rootpy-dev Google groups.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file rootpy-0.7.0.tar.gz
.
File metadata
- Download URL: rootpy-0.7.0.tar.gz
- Upload date:
- Size: 307.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53dfe13eceb02a7866f04d67072c352586ac717b61d5ea6c6e9e04ab959ec3da |
|
MD5 | 76494ce721606da05af339f2b61bb6b2 |
|
BLAKE2b-256 | cad0121924e7428768d22528e7c13f735f837f67319cc04f3af2b486a30e0969 |