Log10_DoubleExponentialModel¶
- class threadcount.models.Log10_DoubleExponentialModel(independent_vars=['x'], prefix='', nan_policy='raise', **kwargs)[source]¶
Bases:
CompositeModelLog10 of double exponential decay Model.
\[f(x) = log_{10}(A_1 e^{-x/\tau_1} + A_2 e^{-x/\tau_2})\]where the parameter e1_amplitude corresponds to \(A_1\), e1_decay to \(\tau_1\), e2_amplitude corresponds to \(A_2\), e2_decay to \(\tau_2\).
Utilizes
lmfit.models.ExponentialModeland a custom operation function.The param names are [‘e1_amplitude’,’e1_decay’,’e2_amplitude’,’e2_decay’]
- Parameters:
independent_vars (
listofstr, optional) – Arguments to the model function that are independent variables default is [‘x’]).prefix (str, optional) – String to prepend to parameter names, needed to add two Models that have parameter names in common.
nan_policy ({'raise', 'propagate', 'omit'}, optional) – How to handle NaN and missing values in data. 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
Methods Summary
guess(data, x[, a2_factor, d2_factor])Estimate initial model parameter values from data.
Methods Documentation
- guess(data, x, a2_factor=1, d2_factor=1, **kwargs)[source]¶
Estimate initial model parameter values from data.
Uses the
lmfit.models.ExponentialModelguess function for the first exponential. Uses the function parameters to guess the second.- Parameters:
data (array_like) – Array of data (i.e., y-values) to use to guess parameter values.
x (array_like) – Array of values for the independent variable (i.e., x-values).
a2_factor (float, default 1) – e2_amplitude = e1_amplitude * a2_factor
d2_factor (float, default 1) – e2_decay = e1_decay * d2_factor
**kws (optional) – Additional keyword arguments, passed to model function.
- Returns:
params – Initial, guessed values for the parameters of a Model.
- Return type: