mne.time_frequency.single_trial_power

mne.time_frequency.single_trial_power(data, sfreq, frequencies, use_fft=True, n_cycles=7, baseline=None, baseline_mode='ratio', times=None, decim=1, n_jobs=1, zero_mean=False, verbose=None)

Compute time-frequency power on single epochs

Parameters:

data : array of shape [n_epochs, n_channels, n_times]

The epochs

sfreq : float

Sampling rate

frequencies : array-like

The frequencies

use_fft : bool

Use the FFT for convolutions or not.

n_cycles : float | array of float

Number of cycles in the Morlet wavelet. Fixed number or one per frequency.

baseline : None (default) or tuple of length 2

The time interval to apply baseline correction. If None do not apply it. If baseline is (a, b) the interval is between “a (s)” and “b (s)”. If a is None the beginning of the data is used and if b is None then b is set to the end of the interval. If baseline is equal ot (None, None) all the time interval is used.

baseline_mode : None | ‘ratio’ | ‘zscore’

Do baseline correction with ratio (power is divided by mean power during baseline) or zscore (power is divided by standard deviation of power during baseline after subtracting the mean, power = [power - mean(power_baseline)] / std(power_baseline))

times : array

Required to define baseline

decim : int

Temporal decimation factor

n_jobs : int

The number of epochs to process at the same time

zero_mean : bool

Make sure the wavelets are zero mean.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose).

Returns:

power : 4D array

Power estimate (Epochs x Channels x Frequencies x Timepoints).