fooof.objs.average_fg

fooof.objs.average_fg(fg, bands, avg_method='mean', regenerate=True)[source]

Average across model fits in a FOOOFGroup object.

Parameters
fgFOOOFGroup

Object with model fit results to average across.

bandsBands

Bands object that defines the frequency bands to collapse peaks across.

avg{‘mean’, ‘median’}

Averaging function to use.

regeneratebool, optional, default: True

Whether to regenerate the model for the averaged parameters.

Returns
fmFOOOF

Object containing the average model results.

Raises
ValueError

If the requested averaging method is not understood.

NoModelError

If there are no model fit results available to average across.

Examples using fooof.objs.average_fg