|
[Rivet] rebinning histogramsAndy Buckley andy.buckley at cern.chSun Apr 3 22:22:20 BST 2016
Hi Viesturs, Yes, histograms have several rebinning methods. You can use a Python script for simple rebinning like this: import yoda hists = yoda.read("myfile.yoda") for h in hists: h.rebin(3) #< factor of 3 rebinning yoda.write(hists, "newfile.yoda") Not tested, but it should work: see http://yoda.hepforge.org/pydoc/ and search for "rebin" to get documentation. You can also pass a list of explicit new bin edges to rebin() or use explicit rebinBy & rebinTo methods. Andy On 01/04/16 19:31, Viesturs Veckalns wrote: > Dear Rivet team, > Is it possible to rebin yoda histograms? > Cheers, > Viesturs > > > _______________________________________________ > Rivet mailing list > Rivet at projects.hepforge.org > https://www.hepforge.org/lists/listinfo/rivet > -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |