mne.time_frequency.combine_tfr#

mne.time_frequency.combine_tfr(all_tfr, weights='nave')[source]#

Merge AverageTFR data by weighted addition.

Create a new mne.time_frequency.AverageTFR instance, using a combination of the supplied instances as its data. By default, the mean (weighted by trials) is used. Subtraction can be performed by passing negative weights (e.g., [1, -1]). Data must have the same channels and the same time instants.

Parameters:
all_tfrlist of AverageTFR

The tfr datasets.

weightslist of float | str

The weights to apply to the data of each AverageTFR instance. Can also be 'nave' to weight according to tfr.nave, or 'equal' to use equal weighting (each weighted as 1/N).

Returns:
tfrAverageTFR

The new TFR data.

Notes

Aggregating multitaper TFR datasets with a taper dimension such as for complex or phase data is not supported.

New in v0.11.0.