Talk:EEProbe cnt

From SCCN
Jump to: navigation, search

Rules of the Talk Page:

  1. Always sign your name after your comments. Use the two dashes "--" followed by the four tildes “~~~~” wiki syntax. See Help:Signatures.
  2. Start a new discussion with a ==level 2 heading== at the bottom of the page (or use the “+” tab found at the top of the page)
  3. Indent replies with colons (:) at the beginning of the line. For each subsequent response add a colon (i.e. second response starts with ::)

--Dev Sarma 18:55, 29 June 2009 (UTC)




MEX file required

This function relies on MEX files (pre-compiled Matlab files) that may not be available for your machine. You must contact maarten at ANT (mvelde@ant-neuro.com) to get a plugin tailored to your machine.

You can best compile the source files for this plugin on the system where you use it. Please see http://libeep.sourceforge.net

--A. Delorme 21:49, 30 June 2009 (UTC)

Issue with events

From bug report 1161.

I am importing ANT (.cnt)data to eeglab, and I've checked "import trigger from trigger file (.trg)", then I plotted the channel data. But what I found in the plot is that all of the markers are chunked in the very first 2 seconds, leaving the rest several minutes of the raw files without any marker. So I guess the markers (or say events?) are not registered. I am new to eeglab, not sure where goes wrong. I appreciate any suggestions and help.

Response:

I also had the same problem. I found that others had this problem too, and reported it on the Eeglablist (Ron Ye, Giorgia Cona). This is because when you import a *.cnt file some events are coded as char and others as double. EEGLAB only processes them if the have all the same type (either char or double). If your events were coded as numbers what you could do is to make a script like this (from Giorgia Cona email):

for i=1:size(EEG.event,2);
    EEG.event(i).type=str2num(EEG.event(i).type);
    EEG.event(i).urevent=i;
end

In case your events were words (e.g. 'stim') change str2num for num2str. I tried this function but it was not always working.

You can also add a modified version of this code to the ANT plugin to see if it works. From line 160 to 165 at pop_loadeep.m:

if trg_latency >= 0.5 && trg_latency < EEG.pnts*EEG.trials
    EEG.event(j).type = num2str(trg(i).code);% EEG.event(j).type = trg(i).code; This was the way it was before
    EEG.event(j).latency = trg_latency;
    EEG.event(i).urevent=i; % I added this line
    j = j + 1;
end;

As I said before, if it doesn´t work change num2str for str2num if you only have events coded as numbers.