- MNE version: 1.5
- operating system: Ubuntu 22.04.3 LTS VirtualBox
Platform Linux-6.2.0-31-generic-x86_64-with-glibc2.35
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Executable /usr/bin/python3
CPU x86_64 (4 cores)
Memory 6.9 GB
Core
ββ mne 1.5.0
ββ numpy 1.25.2 (unknown linalg bindings (threadpoolctl module not found: No module named βthreadpoolctlβ))
ββ scipy 1.11.2
ββ matplotlib 3.7.2 (backend=QtAgg)
ββ pooch 1.7.0
ββ jinja2 3.1.2
Numerical (optional)
ββ pandas 2.0.3
ββ unavailable sklearn, numba, nibabel, nilearn, dipy, openmeeg, cupy
Visualization (optional)
ββ pyvista 0.41.1 (OpenGL 4.5 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1 via llvmpipe (LLVM 15.0.7, 128 bits))
ββ pyvistaqt 0.11.0
ββ vtk 9.2.6
ββ qtpy 2.4.0 (PyQt5=5.15.2)
ββ unavailable ipyvtklink, ipympl, pyqtgraph, mne-qt-browser
Ecosystem (optional)
ββ mne-connectivity 0.5.0
ββ unavailable mne-bids, mne-nirs, mne-features, mne-icalabel, mne-bids-pipeline
Hello! I am trying to get the mne-connectivity library to work, but everytime I run the plot_sensors_connectivity
function the plot opens then crashes immediately. I am able to open a pyvista plot using:
from pyvista import examples
globe = examples.load_globe()
globe.plot()
So I know pyvista is working.
I am also getting this warning:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
import os
import pandas as pd
import numpy as np
import mne
from mne_connectivity.viz import plot_sensors_connectivity
import pyvista
import pyvistaqt
import matplotlib.pyplot as plt
mne.viz.set_3d_backend('pyvistaqt')
# Display five rows and columns pandas
pd.set_option('display.max_rows', 5)
pd.set_option('display.max_columns', 5)
df = pd.read_csv('file.csv')
# Remove everyingthing after ' @' in column channels
df['channels'] = df['channels'].str.split(' @').str[0]
# Remove channels column
array = df.drop(columns=['channels'])
# Convert to numpy array
array = array.to_numpy()
info = mne.create_info(ch_names=df['channels'].to_list(), sfreq=1000, ch_types='eeg')
info.set_montage('standard_1020')
# Now, visualize the connectivity in 3D:
plot_sensors_connectivity(info=info, con=array)