specparam.modes.funcs.lorentzian_function

specparam.modes.funcs.lorentzian_function(xs, *params)[source]

Lorentzian function, for fitting aperiodic component as a 1/f function with a knee.

Parameters:
xs1d array

Input x-axis values.

*paramsfloat

Parameters that define the Lorentzian function: offset, knee, 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 Lorentzian fit function as:

\[A(F) = 10^b * \frac{1}{(k + 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(k + F^\chi)\]