Skip to content

Commit d75b3b6

Browse files
import exception
1 parent 6dae5b9 commit d75b3b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

smodels/statistics/speyTools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from typing import Union, Text, Tuple, Dict, List
1515
from spey import ExpectationType, StatisticalModel, get_backend
16+
from spey.system.exceptions import AsimovTestStatZero
1617
from smodels.base.smodelsLogging import logger
1718
from smodels.base.physicsUnits import fb
1819
from smodels.experiment.datasetObj import DataSet
@@ -206,7 +207,7 @@ def getStatModelMultiBin(self,
206207
if hasattr ( ds.dataInfo, "thirdMoment" ):
207208
thirdmomenta.append ( ds.dataInfo.thirdMoment )
208209
if len(thirdmomenta)==0: # SLv1
209-
stat_wrapper = get_backend("default_pdf.correlated_background")
210+
stat_wrapper = get_backend("default.correlated_background")
210211
if _debug["writePoint"]:
211212
f=open ( "data.txt","wt" )
212213
f.write ( f"obsN={obsN}\n" )
@@ -376,7 +377,7 @@ def poi_upper_limit ( self, expected : Union [ bool, Text ],
376377
except ValueError as e:
377378
logger.warning ( f"when computing upper limit for SL: {e}. Will try with other method" )
378379
sys.exit(-1)
379-
except spey.system.exceptions.AsimovTestStatZero as e:
380+
except AsimovTestStatZero as e:
380381
logger.debug ( f"spey returned: {e}. will interpret as ul=inf" )
381382
ret = float("inf")
382383
ret = float(ret) # cast for the printers

0 commit comments

Comments
 (0)