pyeeg.connectivity.csd_ndarray
- pyeeg.connectivity.csd_ndarray(x, fs=1, nfft=None)
Compute the cross-spectral density between each column of x.
- Parameters:
x (ndarray (nsamples, nchannels)) – Input data. The cross-spectral density is computed for every pair of channels with
scipy.signal.csd().fs (float) – Sampling frequency of the signal (in Hz). Default is 1.
nfft (int, optional) – Length of the FFT. If None,
nfft = nsamples.
- Returns:
S – Cross-spectral density tensor, where
nfreqs = nfft // 2 + 1.S[i, j, :]is the cross-spectrum between channelsiandj.- Return type:
ndarray (nchannels, nchannels, nfreqs)