Bugfix in exp_parameter: If resulting sigmas are infinite, values are set to finite values. Leads then to a symmetric distribution.

This commit is contained in:
Ludger Küperkoch 2017-02-22 12:34:05 +01:00
parent fab785d164
commit 21e068ec24

View File

@ -51,8 +51,11 @@ def exp_parameter(te, tm, tl, eta):
sig1 = np.log(eta) / (te - tm) sig1 = np.log(eta) / (te - tm)
sig2 = np.log(eta) / (tm - tl) sig2 = np.log(eta) / (tm - tl)
if np.isinf(sig1) == True:
sig1 = np.log(eta) / (tm - tl)
if np.isinf(sig2) == True:
sig2 = np.log(eta) / (te - tm)
a = 1 / (1 / sig1 + 1 / sig2) a = 1 / (1 / sig1 + 1 / sig2)
return tm, sig1, sig2, a return tm, sig1, sig2, a