forked from IPKM/nmreval
rate and time in exponential function was switched
This commit is contained in:
parent
bc034cf4f4
commit
3793f67951
@ -224,9 +224,9 @@ class ExpFunc:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def func(x, c, x0, beta, pm: int = -1, mode: str = 'time'):
|
def func(x, c, x0, beta, pm: int = -1, mode: str = 'time'):
|
||||||
if mode == '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)
|
return c * np.exp(np.sign(pm) * (x / x0) ** beta)
|
||||||
|
elif mode == 'rate':
|
||||||
|
return c * np.exp(np.sign(pm) * (x * x0) ** beta)
|
||||||
else:
|
else:
|
||||||
raise ValueError('Unknown mode %s. Use either "rate" or "time".' % str(mode))
|
raise ValueError('Unknown mode %s. Use either "rate" or "time".' % str(mode))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user