[Scipy-tickets] [SciPy] #1490: More succinct frontend to plotting package + data model

SciPy Trac scipy-tickets@scipy....
Wed Aug 3 22:41:04 CDT 2011

#1490: More succinct frontend to plotting package + data model
 Reporter:  mr.hworth    |       Owner:  somebody   
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  Other        |     Version:  0.9.0      
 Keywords:               |  

 I do research in high energy physics, and typically use
 [http://root.cern.ch ROOT] for my day-to-day analysis.  However, the
 overall architecture of ROOT is terrible; it seg faults all the time,
 doesn't ever make sense, and is overall very frustrating to use since as
 much time is spent fixing ROOT problems as doing actual data analysis.  I
 would be using SciPy (which I like a lot more), but the problem is that it
 has one feature that it's impossible to live without, which is including
 some sort of data model that allows one to make plots in a single command
 with arbitrary selections on data, etc.  For example, if I have some data
 which is made up of some 1000 entries of x,y,and z, I can create a
 "TTree", fill it with the data, and then do things like this:

 TTree* t = new TTree("T","T");
 Double_t x,y,z;
 for(int i = 0; i< 1000; i++) {
 x = gRandom->Gaus(0,10); y = gRandom->Gaus(-10,4);z =
 t->Draw("x");// Draws a 1D histogram
 t->Draw("y:x","","COLZ");// Draws a 2D histogram
 t->Draw("y:Entry$","Entry$ < 100"); // Draws a scatter plot of y vs. the
 entry number in the tree
 t->Draw("z:y:TMath::Exp(x)","x>1 || y < 11","BOX"); // Draws a 3D box plot
 of z vs. y vs. e^x for all entries which match the selection x > 1 or y <

 Etc.  In other words, for me to see data with all different kinds of
 quality cuts in a matter of seconds as opposed to having to manually
 instantiate, markup, loop, and fill some sort of plot object.  Plus, the
 resulting canvas lets you click on the plots, run fits on the data, zoom,
 unzoom, change colors, plot labels and all that sort of stuff
 interactively if you like, or from the command line with a simple
 plotobject->Fit("gaus") or whatever. You can even fill trees with
 arbitrary data types, collections, and all kinds of things.

 So, ROOT is great for that, but when it comes to trying to do some "real"
 analysis which involves getting the raw data out of the tree, doing some
 sort of operations on them, and then re-storing the data for example, it
 takes ages because of all of the random seg faults, things not working as
 advertised, etc.  Not to mention everything else about ROOT is very
 unwieldy.  Making a simple optimization function which actually works
 (sans seg faults) takes ages even when you know exactly what you're doing;
 nothing like scipy.optimize which always "just works" for me.  Not to
 mention it's in C++, which requires a lot of typing to do things that
 python can do really quickly and simply.

 I would be very happy if scipy sometime integrated these sort of
 "practical everyday" features so I could leave ROOT and its seg faults
 forever!  I would even be more than happy to provide assistance if there's
 enough intrest in it.  I started trying to do something myself (based on
 HDF5 and a class which was modeled closely after the TTree class shown
 above), but quickly discovered it was going to be more work than I could
 handle myself.  Don't know if this is out of the scope of the scipy
 project, but I thought I would mention it anyway, sorry for the long


Ticket URL: <http://projects.scipy.org/scipy/ticket/1490>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list