I am new to MNE Python and I am working with .set files from EEGlab(Matlab) for source estimation analysis. The data were recorded from 66 channels (64 EEG and 2 EOG) from EasyCaps, with 10-20 IS. In Matlab, the EEG.chanlocs correctly shows the coordinates of each electrode (labels, type, theta, radius, X, Y, Z, sph_theta, sph_phi, sph_radius, urchin, ref). But it seems that I cannot read these locations in MNE Python.
import mne
#The .set files are imported ok
data_path = r"D:\EEGdata";
fname = data_path + '\ppt10.set'
mydata = mne.io.read_epochs_eeglab(fname)
#The data look ok, and channel labels are correctly displayed
mydata
mydata.plot()
mydata.ch_names
#But the channel locations are not found
mydata.plot_sensors() #RuntimeError: No valid channel positions found
Any suggestion on how to read the channel locations from the .set files? Or alternatively, how to manually create the locations based on the coordinates from EEG.chanlocs?
I have also tried to use the default montage 10-20, selecting only the channels I used, but I cannot make it work.
#Create a montage based on the standard 1020, which includes 94 electrode labels in upper case
montage = mne.channels.make_standard_montage('standard_1020')
[ch_name.upper() for ch_name in mydata.ch_names] #it correctly convert the channel labels into upper case
mydata.ch_names = [ch_name.upper() for ch_name in mydata.ch_names] #doesn't work
#File "<ipython-input-62-69a7053dc310>", line 1, in <module>
#mydata.ch_names=[ch_name.upper() for ch_name in mydata.ch_names]
#AttributeError: can't set attribute
montage = mne.channels.make_standard_montage('standard_1020',mydata.ch_names]
I also thought I could use a conversion tool to convert the .set files into .fif files. I have checked the online documentation, but I cannot find such tool. Any idea?