rate and time in exponential function was switched

This commit is contained in:
Dominik Demuth 2023-04-12 20:01:27 +02:00
parent bc034cf4f4
commit 3793f67951

View File

@ -224,9 +224,9 @@ class ExpFunc:
@staticmethod
def func(x, c, x0, beta, pm: int = -1, mode: str = 'time'):
if mode == 'time':
return c * np.exp(np.sign(pm) * (x0 * x) ** beta)
elif mode == 'rate':
return c * np.exp(np.sign(pm) * (x / x0) ** beta)
elif mode == 'rate':
return c * np.exp(np.sign(pm) * (x * x0) ** beta)
else:
raise ValueError('Unknown mode %s. Use either "rate" or "time".' % str(mode))