Skip to content

Commit

Permalink
catch exception if checking bb fit status fails
Browse files Browse the repository at this point in the history
  • Loading branch information
piberger committed May 19, 2016
1 parent 203e7f6 commit e09e3b1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ def PopulateResultData(self):
pass

# check convergence of fit and use non-fit method if chi2 is bad
FitChi2Ndf = FitStatus.Chi2() / FitStatus.Ndf() if FitStatus.Ndf() > 0 else -1
try:
FitChi2Ndf = FitStatus.Chi2() / FitStatus.Ndf() if FitStatus.Ndf() > 0 else -1
except:
print "\x1b[31mBumpBonding: can't check status and chi2/ndf of bump bonding fit!\x1b[0m"
FitChi2Ndf = -1

self.ResultData['KeyValueDictPairs']['Chi2Ndf']['Value'] = FitChi2Ndf

if FitChi2Ndf < 0 or FitChi2Ndf > 100:
Expand Down

0 comments on commit e09e3b1

Please sign in to comment.