pyriemann.utils.covariance.coherence¶
- pyriemann.utils.covariance.coherence(X, window=128, overlap=0.75, fmin=None, fmax=None, fs=None, coh='ordinary')¶
Compute squared coherence.
- Parameters:
- Xndarray, shape (n_channels, n_times)
Multi-channel time-series, real-valued.
- windowint, default=128
Length of the FFT window used for spectral estimation.
- overlapfloat, default=0.75
Percentage of overlap between windows.
- fminfloat | None, default=None
Minimal frequency to be returned.
- fmaxfloat | None, default=None
Maximal frequency to be returned.
- fsfloat | None, default=None
Sampling frequency of the time-series.
- coh{“ordinary”, “instantaneous”, “lagged”, “imaginary”}, default=”ordinary”
Coherence type, see
pyriemann.estimation.Coherences
.
- Returns:
- Cndarray, shape (n_channels, n_channels, n_freqs)
Squared coherence matrices, for each frequency bin.
- freqsndarray, shape (n_freqs,)
Frequencies associated to coherence.