Used Fit Models¶
The currently implemented fit models are builtin models from lmfit. To understand what the parameters stand for in the actual equations, you can have a look at the documentation given for the models themselves.
Exponential curve¶
-
class
ExponentialModel(independent_vars=['x'], prefix='', nan_policy='raise', **kwargs)[source]¶ A model based on an exponential decay function (see https://en.wikipedia.org/wiki/Exponential_decay) with two Parameters:
amplitude(
), and decay(
), in:
- Parameters
independent_vars (['x']) – Arguments to func that are independent variables.
prefix (str, optional) – String to prepend to parameter names, needed to add two Models that have parameter names in common.
nan_policy (str, optional) – How to handle NaN and missing values in data. Must be one of: ‘raise’ (default), ‘propagate’, or ‘omit’. See Notes below.
**kwargs (optional) – Keyword arguments to pass to
Model.
Notes
1. nan_policy sets what to do when a NaN or missing value is seen in the data. Should be one of:
‘raise’ : Raise a ValueError (default)
‘propagate’ : do nothing
‘omit’ : drop missing data
Logistic curve¶
-
class
StepModel(independent_vars=['x'], prefix='', nan_policy='raise', form='linear', **kwargs)[source]¶ A model based on a Step function, with three Parameters:
amplitude(
), center(
) and sigma(
).There are four choices for
form:linear(the default)atanorarctanfor an arc-tangent functionerffor an error functionlogisticfor a logistic function (see https://en.wikipedia.org/wiki/Logistic_function)
The step function starts with a value 0, and ends with a value of
rising to
at
, with
setting the characteristic width. The functional forms are defined as:![\begin{eqnarray*}
& f(x; A, \mu, \sigma, {\mathrm{form={}'linear{}'}}) & = A \min{[1, \max{(0, \alpha)}]} \\
& f(x; A, \mu, \sigma, {\mathrm{form={}'arctan{}'}}) & = A [1/2 + \arctan{(\alpha)}/{\pi}] \\
& f(x; A, \mu, \sigma, {\mathrm{form={}'erf{}'}}) & = A [1 + {\operatorname{erf}}(\alpha)]/2 \\
& f(x; A, \mu, \sigma, {\mathrm{form={}'logistic{}'}})& = A [1 - \frac{1}{1 + e^{\alpha}} ]
\end{eqnarray*}](_images/math/012bff32d56a3cfb3c73d89529061090fda791ec.png)
where
.- Parameters
independent_vars (['x']) – Arguments to func that are independent variables.
prefix (str, optional) – String to prepend to parameter names, needed to add two Models that have parameter names in common.
nan_policy (str, optional) – How to handle NaN and missing values in data. Must be one of: ‘raise’ (default), ‘propagate’, or ‘omit’. See Notes below.
**kwargs (optional) – Keyword arguments to pass to
Model.
Notes
1. nan_policy sets what to do when a NaN or missing value is seen in the data. Should be one of:
‘raise’ : Raise a ValueError (default)
‘propagate’ : do nothing
‘omit’ : drop missing data