Skip to content

Commit

Permalink
Small changes in docs. Changed the narrow resonance limit to 0.02 and
Browse files Browse the repository at this point in the history
removed globalInfo from _getBestResults
  • Loading branch information
andlessa committed Jul 31, 2024
1 parent e7a0eec commit 5cfff82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smodels/matching/theoryPrediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def theoryPredictionsFor(database : Database, smsTopDict : Dict,
expResults = sum(dataSetResults)
else:
expResults = TheoryPredictionList()
bestRes = _getBestResult(dataSetResults,expResult.globalInfo)
bestRes = _getBestResult(dataSetResults)
if not bestRes is None:
expResults.append(bestRes) # Best result = combination if available

Expand Down Expand Up @@ -819,13 +819,12 @@ def _getCombinedResultFor(dataSetResults, expResult):
return theoryPrediction


def _getBestResult(dataSetResults, globalInfo):
def _getBestResult(dataSetResults):
"""
Returns the best result according to the expected upper limit.
If a combined result is included in the list, always return it.
:param datasetPredictions: list of TheoryPredictionList objects
:param globalInfo: globalInfo of the exp result (used to get the region types)
:return: best result (TheoryPrediction object)
"""

Expand All @@ -840,6 +839,7 @@ def _getBestResult(dataSetResults, globalInfo):
if isinstance(tp.dataset,CombinedDataSet):
return tp


# For efficiency-map analyses with multipler signal regions,
# select the best one according to the expected upper limit:
bestExpectedR = 0.0
Expand All @@ -850,6 +850,7 @@ def _getBestResult(dataSetResults, globalInfo):
logger.error("Multiple clusters should only exist for upper limit results!")
raise SModelSError()
dataset = predList[0].dataset
globalInfo = dataset.globalInfo

# Only a SR can be the best SR
stop = False
Expand Down

0 comments on commit 5cfff82

Please sign in to comment.