<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr"><p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p></p>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
Hi,</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
Thanks for the response. It worked perfectly. I do have one more question though.</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
I have been struggling to find the events from my files. Here is what I've got so far:</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
I am attaching a vhdr file with the markers</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
import mne<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
mne.set_log_level('WARNING')
<div style="margin: 0px">fname = &quot;go.nogo.01.vhdr&quot;</div>
raw = mne.io.read_raw_brainvision(fname, preload=True)<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
montage = mne.channels.make_standard_montage('standard_1020')raw.set_montage(montage, raise_if_subset = False)<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
ica = mne.preprocessing.ICA(n_components=15, random_state=97)
<div style="margin: 0px">ica.fit(raw.copy().filter(1,40))</div>
ica.plot_sources(raw);<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
ica.plot_components()<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
raw = ica.apply(raw.copy(), exclude = ica.exclude)
<div style="margin: 0px"><br>
</div>
raw.plot();<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
events = mne.events_from_annotations(raw, event_id='auto')
<div style="margin: 0px">events;</div>
tmin, tmax = -0.2, 0.5<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
events_nogo_sed = [88,89,90,91,92,93,94,95,96,97,98,99,100,
<div style="margin: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 101,102,103,104,105,106,107,108,109,110,</div>
<div style="margin: 0px">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 111,112,113]</div>
<br>
epochs = mne.Epochs(raw, events, events_nogo_sed, tmin, tmax)</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: black; background-color: rgb(255, 255, 255)">
<pre style="font-size: 14px; font-family: monospace; text-align: left; background-color: white; display: block; border-radius: 0px; margin: 0px; padding: 1px 0px; word-break: break-all; overflow: auto; box-sizing: border-box; white-space: pre-wrap !important"><span style="margin: 0px; font-weight: bold; color: rgb(178, 43, 49); box-sizing: border-box">TypeError</span>: events should be a NumPy array of integers, got &lt;class 'tuple'&gt;</pre>
<br>
</div>
<div style="margin: 0px">
<div style="margin: 0px"></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0)">
<br style="font-size: 16px; background-color: rgb(255, 255, 255)">
</div>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> mne_analysis-bounces@nmr.mgh.harvard.edu &lt;mne_analysis-bounces@nmr.mgh.harvard.edu&gt; on behalf of Eric Larson &lt;larson.eric.d@gmail.com&gt;<br>
<b>Sent:</b> Monday, September 21, 2020 7:05 AM<br>
<b>To:</b> Discussion and support forum for the users of MNE Software &lt;mne_analysis@nmr.mgh.harvard.edu&gt;<br>
<b>Subject:</b> Re: [Mne_analysis] No digitization found - ICA</font>
<div>&nbsp;</div>
</div>
<div>
<p><span style="padding:3px 10px; border-radius:5px; color:#ffffff; font-weight:bold; display:inline-block; background-color:#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
<p></p>
<div dir="ltr">Your channels appear to use the 10-20 system. Something like this should work:
<div><br>
</div>
<div>import mne<br>
</div>
<div>fname = &quot;go.nogo.01.vhdr&quot;<br>
raw = mne.io.read_raw_brainvision(fname, preload=True)<br>
raw.filter(1, 40)<br>
montage = mne.channels.make_standard_montage('standard_1020')<br>
raw.set_montage(montage, on_missing='ignore')&nbsp; # RIghtEar missing<br>
ica = mne.preprocessing.ICA(n_components=15, random_state=97)<br>
ica.fit(raw)<br>
ica.plot_sources(raw)<br>
ica.plot_components()<br>
</div>
<div><br>
</div>
<div>See for more information:</div>
<div><br>
</div>
<div><a href="https://mne.tools/dev/auto_tutorials/intro/plot_40_sensor_locations.html?highlight=set_montage">https://mne.tools/dev/auto_tutorials/intro/plot_40_sensor_locations.html?highlight=set_montage</a><br>
</div>
<div><br>
</div>
<div>Eric</div>
<div><br>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Sep 21, 2020 at 8:37 AM Daniel Cabral &lt;<a href="mailto:dac0069@auburn.edu">dac0069@auburn.edu</a>&gt; wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<p><span style="padding:3px 10px; border-radius:5px; color:rgb(255,255,255); font-weight:bold; display:inline-block; background-color:rgb(255,0,0)">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
<p></p>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi,&nbsp;</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
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: &quot;No digitization points found&quot;. 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.&nbsp; 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).&nbsp;<span style="color:rgb(0,0,0); font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">I
 looked all over the MNE website for solutions, but I simply can't work this out.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(0,0,0); font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(0,0,0); font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">PS: MNE is amazing!</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="color:rgb(0,0,0); font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Here is what I've got so far:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
import mne
<div><br>
</div>
<div>mne.set_log_level('WARNING')</div>
<div>fname = &quot;go.nogo.01.vhdr&quot;</div>
<div>raw = mne.io.read_raw_brainvision(fname, preload=True)</div>
<div><br>
</div>
<div>raw.plot_psd(fmax = 50)</div>
<div><br>
</div>
<div>raw.plot()</div>
<div><br>
</div>
<div>raw.filter(1,40)</div>
<div><br>
</div>
<div>raw.plot()</div>
<div><br>
</div>
<div>raw_new_ref = mne.add_reference_channels(raw, ref_channels=['RightEar'])</div>
<div>raw_new_ref.plot()</div>
<div><br>
</div>
<div>ica = mne.preprocessing.ICA(n_components=15, random_state=97)</div>
<div>ica.fit(raw)</div>
<div>ica.plot_sources(raw)</div>
<div><br>
</div>
<div>ica.plot_components()</div>
<br>
<br>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_gmail-m_7024625711199201036Signature">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<b>Daniel Cabral.</b></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
PhD student</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Graduate Teaching Assistant</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Performance and Exercise Psychophysiology lab</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
School of Kinesiology</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Auburn University</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a></blockquote>
</div>
</div>
</div>
</body>
</html>