catch error in f-test

This commit is contained in:
Dominik Demuth 2023-05-19 16:00:04 +02:00
parent 66a0e40a23
commit 8673e5acdb

View File

@ -320,7 +320,13 @@ class FitResult(Points):
f_value = 1e318
else:
f_value = (chi2-self.statistics['chi^2']) / (dof-self.dof) / self.statistics['red. chi^2']
return f_value, 1-fdist.cdf(f_value, dof-self.dof, self.dof)
try:
prob_f = 1-fdist.cdf(f_value, dof-self.dof, self.dof)
except:
prob_f = 0
return f_value, prob_f
def get_state(self):
state = super().get_state()