<p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;"> External Email - Use Caution </span></p><p></p><div dir="ltr">Thank you so much!! It worked!<div>but I've faced with another problem making custom epochs. Could you give me some advice?</div><div><br></div><div>Thank you!!</div><div><br></div><div><br></div><div>I see this error even though I picked 18 channels :</div><div> </div><div><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><span class="gmail-ansi-red-fg" style="box-sizing:border-box;color:rgb(231,92,88)">ValueError</span>: All picks must be < n_channels (30), got 30</pre><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><br></pre><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><font face="arial, sans-serif">This is my code :</font></pre><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline"><font face="arial, sans-serif"><br></font></pre><pre style="box-sizing:border-box;overflow:auto;font-size:14px;padding:1px 0px;margin-top:0px;margin-bottom:0px;line-height:inherit;word-break:break-all;color:rgb(0,0,0);border:0px;border-radius:0px;white-space:pre-wrap;vertical-align:baseline">event_id = {'S 4':4, 'S 6':6, 'S 7':7, 'S 1':1, 'S 5':5, 'S 3':3, 'S 2':2}<br>events= mne.events_from_annotations(raw)<br>n_channels = 32<br>sampling_rate = 500<br>info = mne.create_info(n_channels, sampling_rate)<br>channel_names = ['Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T7', 'T8', 'P7', 'P8', 'Fz', 'Cz', 'Pz', 'FC1', 'FC2', 'CP1', 'CP2', 'FC5', 'FC6', 'CP5', 'CP6', 'TP9', 'TP10', 'EOG', 'M1', 'M2']<br>channel_types = ['eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eog', 'bio', 'bio']<br>sfreq = 500<br>info['description'] = 'My custom dataset'<br>info['bads'] = ['Fp1', 'Fp2', 'F7', 'F8', 'T7', 'T8', 'TP9', 'TP10']<br>include = ['F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'P7', 'P8', 'FC1', 'FC2', 'CP1', 'CP2', 'FC5', 'FC6', 'CP5', 'CP6']<br>picks = mne.pick_channels(channel_names, include=include, exclude=info['bads'], ordered=False)<br>tmin= -0.2<br>tmax = 0.8<br>custom_epochs = mne.EpochsArray(raw, info, picks, events, event_id)<font face="arial, sans-serif"><br></font></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2019년 5월 22일 (수) 오후 10:26, Brunner, Clemens (<a href="mailto:clemens.brunner@uni-graz.at">clemens.brunner@uni-graz.at</a>) <<a href="mailto:clemens.brunner@uni-graz.at">clemens.brunner@uni-graz.at</a>>님이 작성:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="en-AT"><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)"> External Email - Use Caution </span></p><p></p>
<div class="gmail-m_-1762800876751455380WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Your markers are probably in raw.annotations. If you want to convert them to events, use mne.events_from_annotations(raw).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Clemens<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="en-AT"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> <a href="mailto:mne_analysis-bounces@nmr.mgh.harvard.edu" target="_blank">mne_analysis-bounces@nmr.mgh.harvard.edu</a> <<a href="mailto:mne_analysis-bounces@nmr.mgh.harvard.edu" target="_blank">mne_analysis-bounces@nmr.mgh.harvard.edu</a>>
<b>On Behalf Of </b>Soan KIM<br>
<b>Sent:</b> Wednesday, 22 May 2019 14:04<br>
<b>To:</b> <a href="mailto:mne_analysis@nmr.mgh.harvard.edu" target="_blank">mne_analysis@nmr.mgh.harvard.edu</a><br>
<b>Subject:</b> [Mne_analysis] Could you help me find events from ".set" file?<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p><b><span style="color:white;background:red"> External Email - Use Caution </span></b><u></u><u></u></p>
<div>
<p class="MsoNormal">Hello, I am a student learning MNE-python.<br>
I have trouble finding events in my ".set" file. It appears empty.<br>
I've also tried mne.io.read_epochs_eeglab with my another epoched<br>
".set" file, but the list of events is also empty.<br>
To be specific, my raw eeg file was '.vhdr', '.vmrk', and<br>
'.eeg.(BrainProduct)', with no stim_channel. And the data had no<br>
problem when I pre-processed and ran statistics with EEGLAB and<br>
ERPlab. Could you please help me?<u></u><u></u></p>
<div>
<p class="MsoNormal">I attach my continuous eeg file('001.set' , '001.fdt'), and epoched one("001_sync.set", '001_sync.fdt")<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
Thank you.<br>
<br>
-------<br>
This is how my file looks like.<br>
<br>
<Info | 17 non-empty fields<br>
bads : list | 0 items<br>
ch_names : list | Fp1, Fp2, F3, F4, C3, C4, P3, P4, O1, ...<br>
chs : list | 30 items (EEG: 30)<br>
comps : list | 0 items<br>
custom_ref_applied : bool | False<br>
dev_head_t : Transform | 3 items<br>
dig : list | 29 items (29 EEG)<br>
events : list | 0 items<br>
highpass : float | 0.0 Hz<br>
hpi_meas : list | 0 items<br>
hpi_results : list | 0 items<br>
lowpass : float | 125.0 Hz<br>
meas_date : NoneType | unspecified<br>
nchan : int | 30<br>
proc_history : list | 0 items<br>
projs : list | 0 items<br>
sfreq : float | 250.0 Hz<br>
acq_pars : NoneType<br>
acq_stim : NoneType<br>
ctf_head_t : NoneType<br>
description : NoneType<br>
dev_ctf_t : NoneType<br>
experimenter : NoneType<br>
file_id : NoneType<br>
gantry_angle : NoneType<br>
hpi_subsystem : NoneType<br>
kit_system_id : NoneType<br>
line_freq : NoneType<br>
meas_id : NoneType<br>
proj_id : NoneType<br>
proj_name : NoneType<br>
subject_info : NoneType<br>
xplotter_layout : NoneType<br>
<br>
-----------<br>
<br>
This is my code :<br>
<br>
raw = mne.io.read_raw_eeglab('/001.set', preload=True)<br>
event_id = {'B1(1)': 1, 'B2(2)':2, 'B3(3)':3, 'B4(4)':4, 'B5(5)':5,<br>
'B6(6)':6, 'B7(7)':7}<br>
events= mne.find_events(raw)<br>
data, times = raw[:, :]<br>
data.shape<br>
start, stop = raw.time_as_index([0, 503955])<br>
data, times = raw[:, start:stop]<br>
times.max()<br>
picks = mne.pick_types(<a href="http://raw.info/" target="_blank">raw.info</a>,meg=False,eeg=True,stim=False,eog=False,ecg=False,misc=False)<br>
<br>
events = mne.find_events(raw, stim_channel=None, verbose=True)<br>
events[:]<br>
<br>
<span style="font-size:13.5pt">array([], shape=(0, 3), dtype=int32)</span><u></u><u></u></p>
<div style="border:1pt solid rgb(221,221,221);padding:4pt;max-height:18px">
<p class="MsoNormal" style="background:whitesmoke"><b><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><a href="https://drive.google.com/file/d/1cWYSfx4Xjd_0how-JlNMqIRtKg8iKwOO/view?usp=drive_web" target="_blank"><span style="border:1pt none windowtext;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1025" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."> </span><span style="color:rgb(17,85,204);border:1pt none windowtext;padding:0cm;text-decoration:none">001.fdt</span></a><span style="border:1pt solid windowtext;padding:0cm"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1026" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."></span><u></u><u></u></span></b></p>
</div>
<div style="border:1pt solid rgb(221,221,221);padding:4pt;max-height:18px">
<p class="MsoNormal" style="background:whitesmoke"><b><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><a href="https://drive.google.com/file/d/1W4_ZT9T1VV1E9spAQZI9iTN-JllRMkcR/view?usp=drive_web" target="_blank"><span style="border:1pt none windowtext;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1027" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."> </span><span style="color:rgb(17,85,204);border:1pt none windowtext;padding:0cm;text-decoration:none">001.set</span></a><span style="border:1pt solid windowtext;padding:0cm"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1028" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."></span><u></u><u></u></span></b></p>
</div>
<div style="border:1pt solid rgb(221,221,221);padding:4pt;max-height:18px">
<p class="MsoNormal" style="background:whitesmoke"><b><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><a href="https://drive.google.com/file/d/1UIcPulCpgIHbrNbsJMPF_dJsjwhYhDNv/view?usp=drive_web" target="_blank"><span style="border:1pt none windowtext;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1029" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."> </span><span style="color:rgb(17,85,204);border:1pt none windowtext;padding:0cm;text-decoration:none">001_sync.fdt</span></a><span style="border:1pt solid windowtext;padding:0cm"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1030" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."></span><u></u><u></u></span></b></p>
</div>
<div style="border:1pt solid rgb(221,221,221);padding:4pt;max-height:18px">
<p class="MsoNormal" style="background:whitesmoke"><b><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(34,34,34)"><a href="https://drive.google.com/file/d/1GlIuQqDkgEr4waisO8zHdR2RA66j_T52/view?usp=drive_web" target="_blank"><span style="border:1pt none windowtext;padding:0cm;text-decoration:none"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1031" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."> </span><span style="color:rgb(17,85,204);border:1pt none windowtext;padding:0cm;text-decoration:none">001_sync.set</span></a><span style="border:1pt solid windowtext;padding:0cm"><img border="0" width="100" height="100" style="width: 1.0416in; height: 1.0416in;" id="gmail-m_-1762800876751455380_x0000_i1032" src="cid:16ae0419ebea30f8d381" alt="Image removed by sender."></span><u></u><u></u></span></b></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div>서울시 성북구 안암로 145 고려대학교 136-701</div><div>Korea University, 145 Anam-ro, Seongbuk-gu, Seoul, Korea</div></div>