- MNE version: 0.24.1
- MNE Connectivity version: 0.2
- operating system: Ubuntu 20.04
I am using the spectral connectivity function
mne_connectivity.spectral_connectivity. I run it like this:
con = mne_connectivity.spectral_connectivity(label_ts, method=['ciplv', 'pli'], mode='multitaper', sfreq=raw.info["sfreq"], fmin=[8.], fmax=[13.], faverage=True)
The code runs fine and produces connectivity matrices. However, the ciPLV connectivity matrix contains a significant proportion of NaN values, which disconcerts further analysis. Meanwhile, the PLI connectivity matrix does not contain any NaN values.
After looking at the source code of
spectral_connectivity, I came to the conclusion that most likely the cross spectral density somehow gets a zero value for some label pairs (in some epochs).
I’m looking for advice on how to check my data for any artefacts that could cause this issue. For reference, I’m using a large dataset and only a handful of subjects have this issue (10 out of ~600 participants).