Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Oct 11, 2022
1 parent e9d64f9 commit 5e94165
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ostap/fitting/fit2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,11 @@ def __init__ ( self ,
if bkg_2D and isinstance ( bkg_2D , ( tuple , list ) ) :
from ostap.fitting.models_2d import make_B2D
self.__bb_cmp = make_B2D ( bb_name , self.xvar , self.yvar , *bkg_2D )
elif bkg_2D :
self.__bb_cmp = self.make_PDF2 ( bkg_2D ,
xvar = self.xvar ,
yvar = self.yvar ,
name = bb_name )[0]
else :
self.__bkg_2x = self.make_bkg ( bkg_2x , self.new_name ( 'Bkg2X_BB' , suffix ) , self.xvar )
self.__bkg_2y = self.make_bkg ( bkg_2y , self.new_name ( 'Bkg2Y_BB' , suffix ) , self.yvar )
Expand Down Expand Up @@ -1044,15 +1049,11 @@ def __init__ ( self ,
self.__bkg_2x = None
self.__bkg_2y = None

bb_name = self.generate_name ( 'BB_' + self.name )

if isinstance ( bkg_2D , int ) :

bb_name = self.generate_name ( 'BB_' + self.name )
if isinstance ( bkg_2D , int ) :
from ostap.fitting.models_2d import make_B2Dsym
self.__bb_cmp = make_B2Dsym ( bb_name , self.xvar , self.yvar , bkg_2D )

elif bkg_2D :

self.__bb_cmp = make_B2Dsym ( bb_name , self.xvar , self.yvar , bkg_2D )
elif bkg_2D :
self.__bb_cmp = self.make_PDF2 ( bkg_2D ,
xvar = self.xvar ,
yvar = self.yvar ,
Expand Down

0 comments on commit 5e94165

Please sign in to comment.