pyrasa.utils.fit_funcs.FixedFitFun#

class pyrasa.utils.fit_funcs.FixedFitFun(freq: ndarray, aperiodic_spectrum: ndarray, scale_factor: int | float)[source]#

A model for fitting aperiodic activity in power spectra.

The FixedFitFun class extends AbstractFitFun to model aperiodic activity in power spectra using a fixed function that does not include a spectral knee. This model is suitable for cases where the aperiodic component of the spectrum follows a consistent slope across the entire frequency range.

label#

A label to identify this fitting model. Default is ‘fixed’.

Type:

str

log10_aperiodic#

Indicates whether to log-transform the aperiodic spectrum. Default is True.

Type:

bool

func(x: np.ndarray, Offset: float, Exponent: float) np.ndarray[source]#

Defines the model function for aperiodic activity without a spectral knee.

curve_kwargs() dict[str, Any]#

Generates initial guess parameters and other keyword arguments for curve fitting.

Attributes:
aperiodic_spectrum
curve_kwargs
freq
scale_factor

Methods

func(x, Offset, Exponent)

Specparams fixed fitting function.

add_infos_to_df

fit_func

handle_scaling

__hash__ = None#
func(x: ndarray, Offset: float, Exponent: float) ndarray[source]#

Specparams fixed fitting function. Use this to model aperiodic activity without a spectral knee