<div dir="ltr">
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hi Deepa,</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">I'm not quite familiar with the pop_importevent function in EEGLAB. But can you show your command line code/scripts to import event? Maybe I can help you to look into it.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Best,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Chao</div>
<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font size="2" face="arial, helvetica, sans-serif">Chao Wang, PhD Candidate</font><div><font size="2" face="arial, helvetica, sans-serif">Institute of Biomedical Engineering<br>Xi'an Jiaotong University<br>No.28, Xianning West Road, Xi'an, P.R. China</font></div></div></div></div>
<br><div class="gmail_quote">On Thu, Mar 8, 2018 at 5:17 AM, Deepa Gupta <span dir="ltr"><<a href="mailto:deepag1@umbc.edu" target="_blank">deepag1@umbc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Chao,<div><br></div><div>Thank you very much for your response. I looked into what you suggested, tried a couple things and in summary, I am facing the following issues:</div><div><br></div><div><b>Scenario 1</b></div><div>If I keep my original events that get imported along EEG data from the CNT file and then try to import events using pop_importevent on the console instead of the GUI, I get the following error:</div><div><br></div><div><div><font face="monospace, monospace">Reading file (lines): 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 177</font></div><div><font face="monospace, monospace">importevent warning: 177/390 event(s) have invalid latencies and were removed</font></div><div><font face="monospace, monospace">eeg_checkset note: re-creating the original event table (EEG.urevent)</font></div></div><div><br></div><div>So, it removes all of my events because apparently my text file has 'invalid latencies' (i am not sure why it's invalid here though)</div><div><br></div><div><b style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Scenario 2</b><br></div><div>if I delete my EEG.event and urevent structure beforehand and then import new events from my text file, then I get the following error:</div><div><br></div><div><div><font face="monospace, monospace">Reference to non-existent field 'latency'.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Error in importevent (line 210)</font></div><div><font face="monospace, monospace"> event(index+offset).init_time = event(index+offset).latency*g.<wbr>timeunit;</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Error in pop_importevent (line 220)</font></div><div><font face="monospace, monospace">EEG.event = importevent( [], EEG.event, EEG.srate, args{:});</font></div></div><div><br></div><div><div>To <b>conclude</b>, I am not sure what is so wrong with my latency values. They are in seconds. Basically, I have a scenario where I have events that are redundant. I am importing new events file such that not only these redundancies and unnecessary events (event#64) are removed but also new event markers (event#0 and 2) and their times are inserted. For example:</div><div><br></div><div>old events sample:</div><div>Type Latency</div><div><div>1<span style="white-space:pre-wrap"> </span>12452</div><div>1<span style="white-space:pre-wrap"> </span>12452</div><div>64<span style="white-space:pre-wrap"> </span>16477</div><div>1<span style="white-space:pre-wrap"> </span>16483</div><div>1<span style="white-space:pre-wrap"> </span>20520</div></div><div><br></div><div>new event sample:</div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Type Latency</span><br></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><div>0<span style="white-space:pre-wrap"> </span>12.0510</div><div>1<span style="white-space:pre-wrap"> </span>12.4510</div><div>2<span style="white-space:pre-wrap"> </span>12.8510</div><div>0<span style="white-space:pre-wrap"> </span>16.0820</div><div>1<span style="white-space:pre-wrap"> </span>16.4820</div><div>2<span style="white-space:pre-wrap"> </span>16.8820</div><div>0<span style="white-space:pre-wrap"> </span>24.1510</div><div>1<span style="white-space:pre-wrap"> </span>24.5510</div><div>2<span style="white-space:pre-wrap"> </span>24.9510</div></span></div><div><br></div><div><br></div><div>However, there are either alignment issues or my latencies are invalid. I am not sure how to resolve this. Any help or insight will be greatly appreciated. </div><div><br></div><div>Thank you in advance,</div><div>Sincerely,</div><div> </div></div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div class="m_-2650103269763049853gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><br></div><div>Deepa Gupta</div><div><span style="font-size:12.8000001907349px">Research Assistant (<a href="https://www.csee.umbc.edu/~choa/CurrentProjects/index.html" target="_blank">details</a>)<br></span></div><div><a href="http://www.csee.umbc.edu" style="font-size:12.8000001907349px" target="_blank">CSEE</a> at<span style="font-size:12.8000001907349px"> </span><a href="http://www.umbc.edu" style="font-size:12.8000001907349px" target="_blank">UMBC</a></div></div></div></div></div></div></div></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Sun, Mar 4, 2018 at 3:27 AM, chao wang <span dir="ltr"><<a href="mailto:hnchaowang@gmail.com" target="_blank">hnchaowang@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi,
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Deepa</span></div><div class="gmail_extra"><br></div><div class="gmail_extra">Type 'help pop_importevent', resulting the following information regarding the required event file formats:</div><div class="gmail_extra"><br></div><div class="gmail_extra">" ...</div><div class="gmail_extra"><br></div><div class="gmail_extra">This loads the ascii file 'event_values.txt' containing 3 columns </div><div class="gmail_extra">(event_type, latency, and condition). Latencies in the file are</div><div class="gmail_extra"> in ms (1E-3). The first event latency is re-aligned with the </div><div class="gmail_extra">beginning of the dataset ('align', 0). Any previous events </div><div class="gmail_extra">are erased ('append', 'no').</div><div class="gmail_extra"><br></div><div class="gmail_extra">..."</div><div class="gmail_extra"><br></div><div class="gmail_extra">May be you should check your input event files first.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Best,</div><div class="gmail_extra">Chao</div><div class="gmail_extra">
<br clear="all"><div><div class="m_-2650103269763049853m_7682966849921580942gmail_signature"><div dir="ltr"><font size="2" face="arial, helvetica, sans-serif">Chao Wang, PhD Candidate</font><div><font size="2" face="arial, helvetica, sans-serif">Institute of Biomedical Engineering<br>Xi'an Jiaotong University<br><a href="https://maps.google.com/?q=No.28,+Xianning+West+Road,+Xi+an,+P.R.+China&entry=gmail&source=g" target="_blank">No.28, Xianning West Road, Xi</a>'<a href="https://maps.google.com/?q=No.28,+Xianning+West+Road,+Xi+an,+P.R.+China&entry=gmail&source=g" target="_blank">an, P.R. China</a></font></div></div></div></div>
<br><div class="gmail_quote">On Sun, Mar 4, 2018 at 4:00 AM, <span dir="ltr"><<a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.<wbr>edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>---------- Forwarded message ----------<br>From: Deepa Gupta <<a href="mailto:deepag1@umbc.edu" target="_blank">deepag1@umbc.edu</a>><br>To: eeglablist <<a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a>><br>Cc: <br>Bcc: <br>Date: Wed, 28 Feb 2018 23:12:49 -0500<br>Subject: [Eeglablist] issue with importing events from MATLAB/ASCII file<br><div dir="ltr">Hi,<div><br></div><div>My import data file (CNT) has some event info but <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I am need to update that by importing a text file with the revised event markers.<span> </span></span>
<br></div><div><br></div><div>On doing that I get the following error:</div><div><br></div><div>EEGLAB error in function importevent() at line 210:</div><div>Reference to non-existent field 'latency'</div><div><br></div><div>The steps I did are as follows:</div><div><br></div><div>1. Imported data from a CNT file</div><div>2. At console, I then ran the command: EEG = pop_editeventvals(EEG,'delete'<wbr>,[1:213]); </div><div>Note: (I checked that EEG.event had 213 elements. That's where I get the size number 213 from)</div><div>3. Next, File>Import event. I browsed to my event txt file for entering the filename in the pop-up window, entered header line as Type Latency and number of header lines is '1'. Rest is the same as usual/default and ok.</div><div><br></div><div>I tried step 3 without the header line in my text file with appropriate parameters as well as with a MAT file but I am still getting the same above described. It seems like (on google-ing) that this is may be a GUI handles issue? The only other eeglab forum I found was the one below but it seems to be not close to my scenario maybe</div><div><a href="https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1106" target="_blank">https://sccn.ucsd.edu/bugzilla<wbr>/show_bug.cgi?id=1106</a><br></div><div><br></div><div>I am not entirely sure. </div><div><br></div><div>any help will be greatly appreciated.</div><div><br></div><div>Many thanks in advance</div><div>Sincerely,</div><div><div><div class="m_-2650103269763049853m_7682966849921580942gmail-m_1662663890278879255gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><br></div><div>Deepa Gupta</div><div><span style="font-size:12.8px">Research Assistant (<a href="https://www.csee.umbc.edu/~choa/CurrentProjects/index.html" target="_blank">details</a>)<br></span></div><div><a href="http://www.csee.umbc.edu" style="font-size:12.8px" target="_blank">CSEE</a> at<span style="font-size:12.8px"> </span><a href="http://www.umbc.edu" style="font-size:12.8px" target="_blank">UMBC</a></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></div><br></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>