specparam.modes.funcs.double_expo_function¶
- specparam.modes.funcs.double_expo_function(xs, *params)[source]¶
Double exponential function, for fitting aperiodic component with two exponents and a knee.
- Parameters:
- xs1d array
Input x-axis values.
- *paramsfloat
Parameters that define the the double exponent function: offset, exp0, knee, exp1.
- Returns:
- ys1d array
Output values for exponential function.
Notes
This is an aperiodic fit function, defined for use with LINEAR freqs and LOG power.
Defines a double-exponent 1/f fit function as:
\[A(F) = 10^b * \frac{1}{F^{\chi_{0}} * (k + F^{\chi_{1}})}\]Note that the above function form is defined in linear/linear space. The equivalent for linear/log, as implemented in the code, is:
\[A(F) = b - \log(F^{\chi_{0}} * (k + F^{\chi_{1}}))\]