[Eeglablist] eeglablist Digest, Vol 161, Issue 1

chao wang hnchaowang at gmail.com
Wed Mar 7 17:52:12 PST 2018


 Hi Deepa,

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.

Best,
Chao


Chao Wang, PhD Candidate
Institute of Biomedical Engineering
Xi'an Jiaotong University
No.28, Xianning West Road, Xi'an, P.R. China

On Thu, Mar 8, 2018 at 5:17 AM, Deepa Gupta <deepag1 at umbc.edu> wrote:

> Dear Chao,
>
> 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:
>
> *Scenario 1*
> 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:
>
> Reading file (lines): 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150
> 160 170 177
> importevent warning: 177/390 event(s) have invalid latencies and were
> removed
> eeg_checkset note: re-creating the original event table (EEG.urevent)
>
> 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)
>
> *Scenario 2*
> 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:
>
> Reference to non-existent field 'latency'.
>
> Error in importevent (line 210)
>                           event(index+offset).init_time  =
> event(index+offset).latency*g.timeunit;
>
> Error in pop_importevent (line 220)
> EEG.event = importevent( [], EEG.event, EEG.srate, args{:});
>
> To *conclude*, 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:
>
> old events sample:
> Type Latency
> 1 12452
> 1 12452
> 64 16477
> 1 16483
> 1 20520
>
> new event sample:
> Type Latency
> 0 12.0510
> 1 12.4510
> 2 12.8510
> 0 16.0820
> 1 16.4820
> 2 16.8820
> 0 24.1510
> 1 24.5510
> 2 24.9510
>
>
> 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.
>
> Thank you in advance,
> Sincerely,
>
>
>
> Deepa Gupta
> Research Assistant (details
> <https://www.csee.umbc.edu/~choa/CurrentProjects/index.html>)
> CSEE <http://www.csee.umbc.edu> at UMBC <http://www.umbc.edu>
>
> On Sun, Mar 4, 2018 at 3:27 AM, chao wang <hnchaowang at gmail.com> wrote:
>
>> Hi,  Deepa
>>
>> Type 'help pop_importevent', resulting the following information
>> regarding the required event file formats:
>>
>> " ...
>>
>> This loads the ascii file 'event_values.txt' containing 3 columns
>> (event_type, latency, and condition). Latencies in the file are
>>  in ms (1E-3). The first event latency is re-aligned with the
>> beginning of the dataset ('align', 0). Any previous events
>> are erased ('append', 'no').
>>
>> ..."
>>
>> May be you should check your input event files first.
>>
>> Best,
>> Chao
>>
>> Chao Wang, PhD Candidate
>> Institute of Biomedical Engineering
>> Xi'an Jiaotong University
>> No.28, Xianning West Road, Xi
>> <https://maps.google.com/?q=No.28,+Xianning+West+Road,+Xi+an,+P.R.+China&entry=gmail&source=g>
>> 'an, P.R. China
>> <https://maps.google.com/?q=No.28,+Xianning+West+Road,+Xi+an,+P.R.+China&entry=gmail&source=g>
>>
>> On Sun, Mar 4, 2018 at 4:00 AM, <eeglablist-request at sccn.ucsd.edu> wrote:
>>
>>>
>>> ---------- Forwarded message ----------
>>> From: Deepa Gupta <deepag1 at umbc.edu>
>>> To: eeglablist <eeglablist at sccn.ucsd.edu>
>>> Cc:
>>> Bcc:
>>> Date: Wed, 28 Feb 2018 23:12:49 -0500
>>> Subject: [Eeglablist] issue with importing events from MATLAB/ASCII file
>>> Hi,
>>>
>>> My import data file (CNT) has some event info but I am need to update
>>> that by importing a text file with the revised event markers.
>>>
>>> On doing that I get the following error:
>>>
>>> EEGLAB error in function importevent() at line 210:
>>> Reference to non-existent field 'latency'
>>>
>>> The steps I did are as follows:
>>>
>>> 1. Imported data from a CNT file
>>> 2. At console, I then ran the command: EEG =
>>> pop_editeventvals(EEG,'delete',[1:213]);
>>> Note: (I checked that EEG.event had 213 elements. That's where I get the
>>> size number 213 from)
>>> 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.
>>>
>>> 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
>>> https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1106
>>>
>>> I am not entirely sure.
>>>
>>> any help will be greatly appreciated.
>>>
>>> Many thanks in advance
>>> Sincerely,
>>>
>>> Deepa Gupta
>>> Research Assistant (details
>>> <https://www.csee.umbc.edu/~choa/CurrentProjects/index.html>)
>>> CSEE <http://www.csee.umbc.edu> at UMBC <http://www.umbc.edu>
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20180308/58e8947f/attachment.html>


More information about the eeglablist mailing list