mne.time_frequency.combine_spectrum#
- mne.time_frequency.combine_spectrum(all_spectrum, weights='nave')[source]#
Merge spectral data by weighted addition.
Create a new
mne.time_frequency.Spectrum
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 frequencies.- Parameters:
- all_spectrum
list
ofSpectrum
The Spectrum objects.
- weights
list
offloat
|str
The weights to apply to the data of each
Spectrum
instance, or a string describing the weighting strategy to apply: ‘nave’ computes sum-to-one weights proportional to each object’s nave attribute; ‘equal’ weights eachSpectrum
by1 / len(all_spectrum)
.
- all_spectrum
- Returns:
- spectrum
Spectrum
The new spectral data.
- spectrum
Notes
New in v1.10.0.