diff --git a/src/nmreval/models/basic.py b/src/nmreval/models/basic.py index 98be0f8..411e218 100644 --- a/src/nmreval/models/basic.py +++ b/src/nmreval/models/basic.py @@ -133,6 +133,30 @@ class Parabola: return c * (x-x0)**2 + y0 +class ParabolaLog: + """ + Parabola (on a log-scale) with vertex :math:`(x_0, y_0)` + + .. math:: + y = C\cdot (x-x_{0}) + y_0 + + Args: + x (array_like): Input values + c (float): Slope + x0 (float): x position of vertex + y0 (float): y position of vertex + + """ + type = 'Basic' + name = 'Log-Parabola' + equation = 'exp[C*(x-x_{0})^{2} + y_{0}]' + params = ['C', 'x_{0}', 'y_{0}'] + + @staticmethod + def func(x, c, x0, y0): + return np.exp(c * (x-x0)**2 + y0) + + class PowerLawCross: """ Crossover between power laws