forked from IPKM/nmreval
catch error in f-test
This commit is contained in:
parent
66a0e40a23
commit
8673e5acdb
@ -320,7 +320,13 @@ class FitResult(Points):
|
|||||||
f_value = 1e318
|
f_value = 1e318
|
||||||
else:
|
else:
|
||||||
f_value = (chi2-self.statistics['chi^2']) / (dof-self.dof) / self.statistics['red. chi^2']
|
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):
|
def get_state(self):
|
||||||
state = super().get_state()
|
state = super().get_state()
|
||||||
|
Loading…
Reference in New Issue
Block a user