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.Spectruminstance, 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
listofSpectrum The Spectrum objects.
- weights
listoffloat|str The weights to apply to the data of each
Spectruminstance, or a string describing the weighting strategy to apply: ‘nave’ computes sum-to-one weights proportional to each object’s nave attribute; ‘equal’ weights eachSpectrumby1 / len(all_spectrum).
- all_spectrum
- Returns:
- spectrum
Spectrum The new spectral data.
- spectrum
Notes
New in v1.10.0.