Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Oct 11, 2022
1 parent 6613fde commit e9d64f9
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 57 deletions.
6 changes: 3 additions & 3 deletions ostap/core/pyrouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
'binomEff_h3' , ## calculate binomial efficiency for 3D-ihstos
#
'makeGraph' , ## make ROOT Graph from input data
'hToGraph' , ## convert historgam to graph
'hToGraph2' , ## convert historgam to graph
'hToGraph3' , ## convert historgam to graph
'hToGraph' , ## convert histogram to graph
'hToGraph2' , ## convert histogram to graph
'hToGraph3' , ## convert histogram to graph
'lw_graph' , ## make Lafferty-Wyatt's graph from the histo
'h1_axis' , ## book 1D-histogram from axis
'h2_axes' , ## book 2D-histogram from axes
Expand Down
4 changes: 2 additions & 2 deletions ostap/fitting/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def ds_project ( dataset , histo , what , cuts = '' , first = 0 , last = -1 , p

from ostap.utils.progress_conf import progress_conf

## finally fill the historgams
## finally fill the histograms
if 3 == hdim :
if progress : sc = Ostap.HistoProject.project3 ( dataset , progress_conf () , *args )
else : sc = Ostap.HistoProject.project3 ( dataset , *args )
Expand Down Expand Up @@ -1166,7 +1166,7 @@ def _rds_addVar_ ( dataset , vname , formula ) :
# func = ... ## Ostap.IFuncData object
# dataset.add_new_var ( 'value' , func )
# @endcode
# - Sample from 1D-historgam
# - Sample from 1D-histogram
# @code
# h1 = ...## 1D histogram
# dataset.add_new_var ( 'nTracks' , h1 ) ## sample from 1D histogram
Expand Down
30 changes: 15 additions & 15 deletions ostap/fitting/pdfbasic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ def clean ( self ) :
# pdf = ...
# h1 = pdf.histo ( 100 , -1 , 10 ) ## specify histogram parameters
# histo_template = ...
# h2 = pdf.histo ( histo = histo_template ) ## use historgam template
# h2 = pdf.histo ( histo = histo_template ) ## use histogram template
# h3 = pdf.histo ( ... , integral = True ) ## use PDF integral within the bin
# h4 = pdf.histo ( ... , density = True ) ## convert to "density" histogram
# @endcode
Expand All @@ -1726,7 +1726,7 @@ def histo ( self ,
>>> pdf = ...
>>> h1 = pdf.histo ( 100 , 0. , 10. ) ## specify histogram parameters
>>> histo_template = ...
>>> h2 = pdf.histo ( histo = histo_template ) ## use historgam template
>>> h2 = pdf.histo ( histo = histo_template ) ## use histogram template
>>> h3 = pdf.histo ( ... , integral = True ) ## use PDF integral within the bin
>>> h4 = pdf.histo ( ... , density = True ) ## convert to 'density' histogram
"""
Expand All @@ -1737,7 +1737,7 @@ def histo ( self ,
hpars = hpars ,
histo = histo )

# loop over the historgam bins
# loop over the histogram bins
for i , x , y in histo.items() :

xv , xe = x.value() , x.error()
Expand Down Expand Up @@ -1767,7 +1767,7 @@ def histo ( self ,
# pdf = ...
# h1 = pdf.roo_histo ( 100 , -1 , 10 ) ## specify histogram parameters
# histo_template = ...
# h2 = pdf.roo_histo ( histo = histo_template ) ## use historgam template
# h2 = pdf.roo_histo ( histo = histo_template ) ## use histogram template
# @endcode
# @see RooAbsPdf::createHistogram
# @see RooAbsPdf::fillHistogram
Expand Down Expand Up @@ -3195,7 +3195,7 @@ def make_histo ( self ,
# pdf = ...
# h1 = pdf.histo ( 100 , 0. , 10. , 20 , 0. , 10 ) ## specify histogram parameters
# histo_template = ...
# h2 = pdf.histo ( histo = histo_template ) ## use historgam template
# h2 = pdf.histo ( histo = histo_template ) ## use histogram template
# h3 = pdf.histo ( ... , integral = True ) ## use PDF integral within the bin
# h4 = pdf.histo ( ... , density = True ) ## convert to "density" histogram
# @endcode
Expand All @@ -3211,7 +3211,7 @@ def histo ( self ,
>>> pdf = ...
>>> h1 = pdf.histo ( 100 , 0. , 10. , 20 , 0. , 10 ) ## specify histogram parameters
>>> histo_template = ...
>>> h2 = pdf.histo ( histo = histo_template ) ## use historgam template
>>> h2 = pdf.histo ( histo = histo_template ) ## use histogram template
>>> h3 = pdf.histo ( ... , integral = True ) ## use PDF integral within the bin
>>> h4 = pdf.histo ( ... , density = True ) ## convert to 'density' histogram
"""
Expand All @@ -3222,7 +3222,7 @@ def histo ( self ,
hpars = hpars ,
histo = histo )

# loop over the historgam bins
# loop over the histogram bins
for ix,iy,x,y,z in histo.items() :

xv , xe = x.value() , x.error()
Expand All @@ -3245,7 +3245,7 @@ def histo ( self ,

histo[ix,iy] = v

## coovert to density historgam, if requested
## coovert to density histogram, if requested
if density : histo = histo.density()

return histo
Expand All @@ -3257,7 +3257,7 @@ def histo ( self ,
# pdf = ...
# h1 = pdf.roo_histo ( 100 , 0. , 10. , 20 , 0. , 10 )
# histo_template = ...
# h2 = pdf.roo_histo ( histo = histo_template ) ## use historgam template
# h2 = pdf.roo_histo ( histo = histo_template ) ## use histogram template
# h3 = pdf.roo_histo ( ... , density = True ) ## convert to "density" histogram
# @endcode
def roo_histo ( self ,
Expand All @@ -3270,7 +3270,7 @@ def roo_histo ( self ,
>>> pdf = ...
>>> h1 = pdf.as_histo ( 100 , 0. , 10. , 20 , 0. , 10 )
>>> histo_template = ...
>>> h2 = pdf.as_histo ( histo = histo_template ) ## use historgam template
>>> h2 = pdf.as_histo ( histo = histo_template ) ## use histogram template
>>> h3 = pdf.as_histo ( ... , density = True ) ## convert to 'density' histogram
"""

Expand Down Expand Up @@ -4432,7 +4432,7 @@ def make_histo ( self ,
# pdf = ...
# h1 = pdf.histo ( 10 , 0. , 10. , 10 , 0. , 4. , 10 , 0. , 3 ) ## specify histogram parameters
# histo_template = ...
# h2 = pdf.histo ( histo = histo_template ) ## use historgam template
# h2 = pdf.histo ( histo = histo_template ) ## use histogram template
# h3 = pdf.histo ( ... , integral = True ) ## use PDF integral within the bin
# @endcode
def histo ( self ,
Expand All @@ -4447,7 +4447,7 @@ def histo ( self ,
>>> pdf = ...
>>> h1 = pdf.histo ( 10 , 0. , 10. , 10 , 0. , 4. , 10 , 0. , 3 ) ## specify histogram parameters
>>> histo_template = ...
>>> h2 = pdf.histo ( histo = histo_template ) ## use historgam template
>>> h2 = pdf.histo ( histo = histo_template ) ## use histogram template
>>> h3 = pdf.histo ( ... , integral = True ) ## use PDF integral within the bin
"""

Expand All @@ -4459,7 +4459,7 @@ def histo ( self ,
histo = histo )


# loop over the historgam bins
# loop over the histogram bins
for ix , iy , iz , x , y , z , w in histo.items() :

xv , xe = x.value() , x.error()
Expand Down Expand Up @@ -4493,7 +4493,7 @@ def histo ( self ,
# pdf = ...
# h1 = pdf.roo_histo ( 10 , 0. , 10. , 10 , 0. , 4. , 10 , 0. , 3 )
# histo_template = ...
# h2 = pdf.roo_histo ( histo = histo_template ) ## use historgam template
# h2 = pdf.roo_histo ( histo = histo_template ) ## use histogram template
# @endcode
def roo_histo ( self ,
xbins = 10 , xmin = None , xmax = None ,
Expand All @@ -4506,7 +4506,7 @@ def roo_histo ( self ,
>>> pdf = ...
>>> h1 = pdf.roo_histo ( 10 , 0. , 10. , 10 , 0. , 4. , 10 , 0. , 3 )
>>> histo_template = ...
>>> h2 = pdf.roo_histo ( histo = histo_template ) ## use historgam template
>>> h2 = pdf.roo_histo ( histo = histo_template ) ## use histogram template
"""

histo = self.make_histo ( xbins = xbins , xmin = xmin , xmax = xmax ,
Expand Down
4 changes: 2 additions & 2 deletions ostap/fitting/simfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def combined_data ( sample ,
# ds = combined_hdata ( sample , (xvar, yvar, zvar) , { 'A' : hA , 'B' : hB } )
# @endcode
# Since the output is <code>RooDataHist</code> the specifications for
# the individual historgams must be the same
# the individual histograms must be the same
def combined_hdata ( sample ,
varset ,
histograms ,
Expand Down Expand Up @@ -227,7 +227,7 @@ def combined_hdata ( sample ,
>>> zvar = ROOT.RooRealVar ( ... )
>>> ds = combined_hdata ( sample , (xvar, yvar, zvar) , { 'A' : hA , 'B' : hB } )
- Since the output is `RooDataHist` the specifications for the individual historgams must be the same
- Since the output is `RooDataHist` the specifications for the individual histograms must be the same
"""

MAP = std.map ( 'std::string' , 'TH1*' )
Expand Down
2 changes: 1 addition & 1 deletion ostap/frames/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ def frame_project ( frame , model , *what ) :
histo = None

#
## convert historgam-like objects into 'models'
## convert histogram-like objects into 'models'
#

if isinstance ( model , ROOT.TProfile2D ) :
Expand Down
22 changes: 11 additions & 11 deletions ostap/histos/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ def _chi2_ ( c , histo , func , accept , funchi2 ) :
ROOT.TH1F.chi2_cmp = _h1_chi2_cmp_

# =============================================================================
## compare the 1D-historgams (as functions)
## compare the 1D-histograms (as functions)
# - calculate the scalar product and get cos(theta) from it
# \f$cos \theta = \frac{ f_1 \cdot f_2 } { \left|f_1\right|\left|f_2\right| }\f$
def _h1_cmp_costheta_ ( h1 ,
h2 ,
density = False ) :
"""Compare the 1D-historgams (as functions)
"""Compare the 1D-histograms (as functions)
Calculate the scalar product and get ``cos(theta)'' from it
>>> h1 = ... ## the first histo
Expand Down Expand Up @@ -402,14 +402,14 @@ def _h1_cmp_costheta_ ( h1 ,


# =============================================================================
## compare the 2D-historgams (as functions)
## compare the 2D-histograms (as functions)
# - calculate the scalar product and get cos(theta) from it
# \f$cos \theta = \frac{ f_1 \cdot f_2 } { \left|f_1\right|\left|f_2\right| }\f$
# @attention It could be rather slow
def _h2_cmp_costheta_ ( h1 ,
h2 ,
density = False ) :
"""Compare the 2D-historgams (as functions)
"""Compare the 2D-histograms (as functions)
Calculate the scalar product and get ``cos(theta)'' from it
>>> h1 = ... ## the first histo
Expand Down Expand Up @@ -450,14 +450,14 @@ def _h2_cmp_costheta_ ( h1 ,
ROOT.TH2D.cmp_cos = _h2_cmp_costheta_

# =============================================================================
## compare the 3D-historgams (as functions)
## compare the 3D-histograms (as functions)
# - calculate the scalar product and get cos(theta) from it
# \f$cos \theta = \frac{ f_1 \cdot f_2 } { \left|f_1\right|\left|f_2\right| }\f$
# @attention It could be rather slow
def _h3_cmp_costheta_ ( h1 ,
h2 ,
density = False ) :
"""Compare the 3D-historgams (as functions)
"""Compare the 3D-histograms (as functions)
Calculate the scalar product and get ``cos(theta)'' from it
>>> h1 = ... ## the first histo
Expand Down Expand Up @@ -504,7 +504,7 @@ def _h3_cmp_costheta_ ( h1 ,
def _h1_cmp_dcostheta_ ( h1 ,
h2 ,
density = False ) :
"""Compare the 1D-historgams (as functions)
"""Compare the 1D-histograms (as functions)
Calculate discrete scalar product and get ``the angle'' from it
>>> h1 = ... ## the first histo
Expand Down Expand Up @@ -1091,7 +1091,7 @@ def _h1_cmp_minmax_ ( h1 ,


# =============================================================================
## compare two historgams and find the largest difference
## compare two histograms and find the largest difference
# @code
# h1 = ...
# h2 = ...
Expand All @@ -1101,7 +1101,7 @@ def _h2_cmp_minmax_ ( h1 ,
h2 ,
density = False ,
diff = lambda a,b : b-a , **kwargs ) :
"""Compare two historgams and find the largest difference
"""Compare two histograms and find the largest difference
>>> h1 = ...
>>> h2 = ...
>>> (x_min,y_min,v_min),(x_max,y_max,v_max) = h1.cmp_minmax ( h2 )
Expand Down Expand Up @@ -1166,7 +1166,7 @@ def _h2_cmp_minmax_ ( h1 ,


# =============================================================================
## compare two historgams and find the largest difference
## compare two histograms and find the largest difference
# @code
# h1 = ...
# h2 = ...
Expand All @@ -1176,7 +1176,7 @@ def _h3_cmp_minmax_ ( h1 ,
h2 ,
density = False ,
diff = lambda a,b : b-a , **kwargs ) :
"""Compare two historgams and find the largest difference
"""Compare two histograms and find the largest difference
>>> h1 = ...
>>> h2 = ...
>>> (x_min,y_min,z_min,v_min),(x_max,y_max,z_max,v_max) = h1.cmp_minmax ( h2 )
Expand Down
Loading

0 comments on commit e9d64f9

Please sign in to comment.