eelbrain.psd_welch

eelbrain.psd_welch(ndvar, fmin=0, fmax=inf, n_fft=256, n_overlap=0, n_per_seg=None)

Power spectral density with Welch’s method

Parameters:
ndvar : NDVar (…, time, …)

Data with time dimension.

fmin : scalar

Lower bound of the frequencies of interest.

fmax : scalar

Upper bound of the frequencies of interest.

n_fft : int

Length of the FFT in samples (default 256).

n_overlap : int

Overlap between segments in samples (default 0).

n_per_seg : int | None

Length of each Welch segment in samples. Smaller n_per_seg result in smoother PSD estimates (default n_fft).

Returns:
psd : NDVar (…, frequency)

Power spectral density.

Notes

Uses mne.time_frequency.psd_array_welch() implementation.