Skip to content

Commit c51b75a

Browse files
asimov flag now propagated
1 parent 40ee3b3 commit c51b75a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

smodels/statistics/statsTools.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,20 +353,16 @@ def likelihood ( self, poi_test : float, expected : Union[bool,Text],
353353
return_nll : bool, asimov : Union[None,float] = None ) -> float:
354354
""" simple frontend to individual computers """
355355
self.transform ( expected )
356-
kwargs = { "expected": expected }
356+
kwargs = { "expected": expected, "asimov": asimov }
357357
if self.dataType == "pyhf":
358-
kwargs["asimov"]=asimov
359358
if not "workspace_index" in kwargs:
360359
index = self.likelihoodComputer.getBestCombinationIndex()
361360
kwargs["workspace_index"] = index
362361
ret = self.likelihoodComputer.likelihood (
363362
poi_test, return_nll = return_nll, **kwargs )
364363
return ret
365-
if asimov != None and self.dataType == "SL":
366-
kwargs["asimov"]=asimov
367-
else:
368-
ret = self.likelihoodComputer.likelihood ( poi_test,
369-
return_nll = return_nll, **kwargs)
364+
ret = self.likelihoodComputer.likelihood ( poi_test,
365+
return_nll = return_nll, **kwargs)
370366
return ret
371367

372368
def CLs ( self, poi_test : float = 1., expected : Union[bool,Text] = False ) -> Union[float,None]:

0 commit comments

Comments
 (0)