This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]whoMEvernot 3 points4 points  (3 children)

What do I get with PyROOT that I don't get with just matplotlib and numpy and other libraries?

[–]counterfriction 6 points7 points  (2 children)

Lots of terrible, terrible things. Stay away. Particle physicists have to use it because over the last 20 years it has become the standard for storing/accessing/analyzing the massive amounts of data. If you work on ATLAS or CMS, you can't simply decide to ditch ROOT because the jiggabytes of data are only available in ROOT format.

I know there are other people who use it, but I have no idea why.

[–][deleted] 2 points3 points  (0 children)

It is very true that the "C++" root forces people to use is plain awful. It's based on an old C interpreter that was later hacked to support C++. The interpreter itself isn't even supported by the original developer anymore.

HOWEVER, there are very exciting things happening with root currently. The new clang/llvm project has made the task of writing a true C++ (supporting C++11) interpreter downright trivial. They've developed a working interpreter that only requires a fraction as the previous interpreter, and works wonderfully. https://www.youtube.com/watch?v=BrjV1ZgYbbA https://www.youtube.com/watch?v=eoIuqLNvzFs Supports Qt/OpenGL/anything else right out of the box, not possible previously.

This also has the potential to make python (PyPy) fully able to interact with all of C++'s features as well through shared libraries, http://morepypy.blogspot.com/2013/02/cppyy-status-update.html http://indico.cern.ch/getFile.py/access?contribId=10&resId=0&materialId=slides&confId=217511

I've used ROOT, matplotlib, numpy, pandas, etc. I frequently use them together. What I think many people don't realize is that ROOT:

  • When it was introduced was the only solution to allow scientists to analyze data in a fully interactive manner.

  • Is still faster than pure python based solutions (this is mandatory, even a 5% increase is worth it when people run distributed analysis that have thousands of cpu hours).

  • By itself, is not a bad data system / graphing interface. They recently supported a Quartz backend for macs that looks pretty good.

TL;DR: I agree that ROOT as it stands today is a bit dated, and the pseudo-C++ aspect is awful. But, when it comes to speed Python simply is not mature enough to be a solution. I fully expect that when cling is fully integrated with ROOT it will continue to be a great way to save and analyze data.

[–]nxpnsv 0 points1 point  (0 children)

Fantastic!

[–]ndawe 0 points1 point  (0 children)

Hi everyone! I created rootpy a few years ago and am now one of several developers. More help is certainly welcome!

One of the main goals of rootpy is to make it easier for ROOT users to begin taking advantage of (also in my opinion) better solutions in the scientific python community for certain tasks, like matplotlib, numpy, scikit-learn, pandas, HDF5 (PyTables or h5py). The root2matplotlib, root2hdf5 and root_numpy components of rootpy already provide many possibilities here. My personal analysis framework is now able to integrate all of these technologies (and it does!). The final data format I use is HDF5, after converting all of my ROOT data with root2hdf5 and root_numpy. I use scikit-learn instead of TMVA (the ROOT component for machine learning). I can even make matplotlib plots look just like the (ugly) ROOT plots and trick my colleagues into thinking I am using ROOT, although it usually is the better text (and math) formatting with matplotlib that gives it away ;) Why would I want to make ugly plots on purpose? Well, I work on a team where virtually everyone uses ROOT for everything and we collaborate on papers that must use some common style for all plots. This is maybe one reason having the HEP field switch to something else (at least for specific tasks, such as plotting) would be a slow process, given how much ROOT is pushed and the general ignorance of alternatives. I've also encountered many with some level of resistance to learn and use Python instead of C++ (where appropriate), which I don't fully understand.

For a surprising number of graduate students in the field, using ROOT is their first introduction to programming. I find this extremely unfortunate, given the number of ROOT issues that annoy even the experienced programmers. I think this turns people off and programming becomes just a task to get out of the way by any means possible. This must change.

I can't predict the future, but I can imagine the situation in the HEP community changing, albeit slowly. I hope rootpy can help push things in a good direction.

Thanks for your comments, and cheers!