Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Dec 11, 2024
1 parent 1865988 commit 3689b6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
1 change: 0 additions & 1 deletion ReleaseNotes/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## Backward incompatible

## Bug fixes


# v1.13.9.0

Expand Down
17 changes: 6 additions & 11 deletions ostap/histos/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,8 @@ def _h1_param_sum_ ( h1 ,
if not opts : opts = 'S'
if not 'S' in opts.upper() : opts += 'S'

if len ( h1 ) < 100 and not 'I' in opts.upper() :
logger.info ("param_sum: add fitting option 'I' ")
opts += 'I'

if h1.GetXaxis().IsVariableBinSize() and not 'I' in opts.upper() :
logger.info ("param_sum: add fitting option 'I' ")
if ( len ( h1 ) < 100 or h1.GetXaxis().IsVariableBinsize() ) and not 'I' in opts.upper() :
logger.info ("param_sum: add fitting option 'I'")
opts += 'I'

## fitting options:
Expand All @@ -262,11 +258,10 @@ def _h1_param_sum_ ( h1 ,
logger.verbose ( 'param_sum: fix parameter %d at %s' % ( i , v ) )
fun.FixParameter ( i , float ( v ) )


if normalized :
fun.FixParameter ( 0 , _integral_ )
r = fun.Fit( h1 , opts+'0Q', '', xmin , xmax )
fun.ReleaseParameter(0)
r = fun.Fit ( h1 , opts+'0Q', '', xmin , xmax )
fun.ReleaseParameter ( 0 )

import ostap.fitting.fitresult
from ostap.fitting.utils import fit_status
Expand All @@ -290,15 +285,15 @@ def _h1_param_sum_ ( h1 ,
if normalized :
fun.FixParameter ( 0 , _integral_ )
r = fun.Fit( h1 , opts+'0Q', '', xmin , xmax )
fun.ReleaseParameter(0)
fun.ReleaseParameter ( 0 )

r = fun.Fit ( h1 , *fopts )
refit -= 1
nfits += 1

if r.Status() :
status = attention ( fit_status ( r.Status() ) )
b_name = type ( b ) . __name__
b_name = type ( b ) . __name__
rtable = r.table ( title = 'Fit result for %s' % b_name , prefix = '# ' )
logger.error ( 'Fit result [%s]\n%s' % ( b_name , rtable ) )

Expand Down

0 comments on commit 3689b6b

Please sign in to comment.