Note
Go to the end to download the full example code.
Electrode Distance.
creation date: 21/03/2024 author: jrodino14@gmail.com description: Example script to calculate distance from an electrode montage from MNE. Requirements: None
import matplotlib.pyplot as plt
import mne
import numpy as np
from eegrasp import EEGrasp
montage = mne.channels.make_standard_montage('biosemi64')
ch_names = montage.ch_names
EEG_pos = montage.get_positions()['ch_pos']
# Restructure into array
EEG_pos = np.array([pos for _, pos in EEG_pos.items()])
im = plt.imshow(W, cmap='gray')
plt.title('Electrode Distance Matrix')
plt.colorbar(label='Euc. Distance [m]')
plt.show()

Total running time of the script: (0 minutes 0.721 seconds)
Estimated memory usage: 185 MB