[Mne_analysis] No digitization found - ICA

Daniel Cabral dac0069 at auburn.edu
Wed Sep 23 20:13:51 EDT 2020
Search archives:

        External Email - Use Caution        

Hi,
Thanks for the response. It worked perfectly. I do have one more question though.
I have been struggling to find the events from my files. Here is what I've got so far:
I am attaching a vhdr file with the markers
import mne

mne.set_log_level('WARNING')
fname = "go.nogo.01.vhdr"
raw = mne.io.read_raw_brainvision(fname, preload=True)

montage = mne.channels.make_standard_montage('standard_1020')raw.set_montage(montage, raise_if_subset = False)

ica = mne.preprocessing.ICA(n_components=15, random_state=97)
ica.fit(raw.copy().filter(1,40))
ica.plot_sources(raw);
ica.plot_components()

raw = ica.apply(raw.copy(), exclude = ica.exclude)

raw.plot();

events = mne.events_from_annotations(raw, event_id='auto')
events;
tmin, tmax = -0.2, 0.5

events_nogo_sed = [88,89,90,91,92,93,94,95,96,97,98,99,100,
                          101,102,103,104,105,106,107,108,109,110,
                          111,112,113]

epochs = mne.Epochs(raw, events, events_nogo_sed, tmin, tmax)


TypeError: events should be a NumPy array of integers, got <class 'tuple'>



________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Eric Larson <larson.eric.d at gmail.com>
Sent: Monday, September 21, 2020 7:05 AM
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu>
Subject: Re: [Mne_analysis] No digitization found - ICA


        External Email - Use Caution

Your channels appear to use the 10-20 system. Something like this should work:

import mne
fname = "go.nogo.01.vhdr"
raw = mne.io.read_raw_brainvision(fname, preload=True)
raw.filter(1, 40)
montage = mne.channels.make_standard_montage('standard_1020')
raw.set_montage(montage, on_missing='ignore')  # RIghtEar missing
ica = mne.preprocessing.ICA(n_components=15, random_state=97)
ica.fit(raw)
ica.plot_sources(raw)
ica.plot_components()

See for more information:

https://mne.tools/dev/auto_tutorials/intro/plot_40_sensor_locations.html?highlight=set_montage

Eric


On Mon, Sep 21, 2020 at 8:37 AM Daniel Cabral <dac0069 at auburn.edu<mailto:dac0069 at auburn.edu>> wrote:

        External Email - Use Caution

Hi,
I am trying to work with a .vhdr file from brainvision. I loaded the data, and did some plots. Then, I tried the ICA, but I ended up with the following error: "No digitization points found". I'm guessing this is related to the set montage. I did a lot of searching, and I noticed a lot of people have the same issue. Still, I can't seem to find a way to solve this.  I am also attaching the file, in case you need. For now, I just want to be able to run the ICA and to properly do the set the montage (if needed). I looked all over the MNE website for solutions, but I simply can't work this out.

PS: MNE is amazing!

Here is what I've got so far:

import mne

mne.set_log_level('WARNING')
fname = "go.nogo.01.vhdr"
raw = mne.io.read_raw_brainvision(fname, preload=True)

raw.plot_psd(fmax = 50)

raw.plot()

raw.filter(1,40)

raw.plot()

raw_new_ref = mne.add_reference_channels(raw, ref_channels=['RightEar'])
raw_new_ref.plot()

ica = mne.preprocessing.ICA(n_components=15, random_state=97)
ica.fit(raw)
ica.plot_sources(raw)

ica.plot_components()



Daniel Cabral.

PhD student
Graduate Teaching Assistant
Performance and Exercise Psychophysiology lab
School of Kinesiology
Auburn University
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200924/c5e948cb/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: go.nogo.01.vmrk
Type: application/octet-stream
Size: 61508 bytes
Desc: go.nogo.01.vmrk
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200924/c5e948cb/attachment-0001.obj 


More information about the Mne_analysis mailing list