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 (A), and decay (\tau), in:

f(x; A, \tau) = A e^{-x/\tau}

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 (A), center (\mu) and sigma (\sigma).

There are four choices for form:

The step function starts with a value 0, and ends with a value of A rising to A/2 at \mu, with \sigma 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*}

where \alpha  = (x - \mu)/{\sigma}.

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