Set of modifications/improvements for Ostap
-
improve 'accumulate' method for histograms:
>>> sum = h.accumulate () >>> sum = h.accumulate ( cut = lambda s : 0.4<=s[1].value()<0.5 ) >>> sum = h.accumulate ( low = 1 , high = 14 ) ## accumulate over 1<= ibin <14 >>> sum = h.accumulate ( xmin = 0.14 , xmax = 14 ) ## accumulate over xmin<= x <xmax
- add xmin/xmax parameters for histogram parameterezation:
b = histo.bezier( 10 , xmin = 0.14 )
- Add Profiler/profiler utilities for Utils.py:
from Ostap.Utils import profiler
with profiler() :
... some code here ...
with profiler( 'output.file' ) :
... some code here ...
- add "--profile" flag to ostap-script:
ostap .... --profile
- ZipShelve: add method 'ikeys' for iteration over 'good' matched keys:
db = ...
for k in db.ikeys('*MC*') :
print k, db[k]