I am trying to run ICA on my EEG data but the MNE didnât have a montage for the EEG system I am using. So, I manually set up montage using EEG channel locations to produce digitized points but itâs not working at all. Itâs giving me an error message that no digitization points were found.
I have attached the screenshot of the channel location that I used to generate the montage.
I have also copied the channel locations with this.
EEG system: mBrainTrain smarting Mobi with 24 EEG electrodes and 2 miscellaneous ones (M1, M2)
operating system: Windows 10
** *CODE
montage_data = pd.read_csv('montage.csv')
montage_data = montage_data.set_index('ch_name', drop =True)
head_radius = 0.095 # in meters
montage_data *= head_radius
ch_name_to_pos_mapping = montage_data.T.to_dict(orient='list')
montage = mne.channels.make_dig_montage(
ch_pos=montage_data.T.to_dict(orient='list') # need to get it into the right shape
)
raw.set_montage(montage)
ica.plot_components()
##RuntimeError: No digitization points found.
********* Channel location with names***************************
Since you seem to be using a standardized electrode placement scheme, and you donât appear to have individually measured digitization points, I would suggest to simply use one of our built-in standard montages!
So you could do, for example:
raw.set_montage(âeasycap-M1â)
(Please replace the quotation marks, I cannot enter the proper ones on my current input device)
For a list of built-in montages, please see the Notes section here:
Hi, @richard Thank you for your answer. I tried using the code
raw.set_montage('easycap-M1')
command. However, it showed this error, see below:
ValueError: DigMontage is only a subset of info. There are 2 channel positions not present in the DigMontage. The required channels are:
[âM1â, âM2â].
Consider using inst.set_channel_types if these are not EEG channels, or use the on_missing parameter if the channel positions are allowed to be unknown in your analyses.
I believe the mastoids are not included in the 10-05 system; if you donât want to use them in your analysis (and only use them for referencing), you should drop them before setting the montage.
Hi @richard@cbnr@sappelhoff , I tried dropping off the M1 and M2 electrodes from the ICA analysis and the raw.set_montage('easycap-M1') worked as well but still there is an error in plotting ICA components.
I have attached the screenshot of the output I got after setting up the montage to ârawâ.
Thank you for the help. But it seems I had attached the wrong image of the error message.
I have attached the correct one now. The issue is that even after setting the montage to the raw, the ica components could not be plotted. The error message says âno digitization points foundâ, which should be set up during the setting up of the montage. Is it the wrong assumption of am I missing something here.
Yes, please post your code (with Markdown formatting)!
Also, electrodes M1 and M2 are typically very close to the positions TP9 and TP10 in the 5%-style systems ⊠so if you donât want to drop them you can either consider renaming them (messy), or make a your own montage using Compute and plot standard EEG electrode positions â eeg_positions 2.2.0.dev0 documentation ⊠there you can enter M1 and M2 as âaliasesâ for TP9 and TP10.
ica.plot_components(outlines=âskirtâ);
WARNING:root:Did not find any electrode locations (in the info object), will attempt to use digitization points instead. However, if digitization points do not correspond to the EEG electrodes, this will lead to bad results. Please verify that the sensor locations in the plot are accurate.