specparam.modes.funcs.powerlaw_function¶
- specparam.modes.funcs.powerlaw_function(xs, *params)[source]¶
Powerlaw function, for fitting aperiodic component as 1/f.
- Parameters:
- xs1d array
Input x-axis values.
- *paramsfloat
Parameters the powerlaw (1/f) function: offset, exponent.
- 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 1/f fit function as:
\[A(F) = 10^b * \frac{1}{F^\chi}\]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)\]