[Eeglablist] GUI vs command line

Brian Roach Brian.Roach at yale.edu
Fri Oct 28 15:30:57 PDT 2005


I am trying to automate some processing of .cnt data files in EEGlab.  I am 
unable to use the EEG.history commands on multiple files.  I am also 
completely unable to use the epoch function at all.  I can do everything 
from the GUI, but something must be lost when I move to command line 
function calls.  I downloaded Matt Stead's updated loadcnt.m file into the 
proper directory, but this did not help.  Has anyone had similar 
difficulties with .cnt data/epoching?  Can anyone tell me (or show example 
of) what the input format should be for the 'events'   (  - vector events 
(expressed in seconds or points) ).  I have no idea about the proper input 
for this argument because I have tried things like:
 >> epocheddata = epoch(EEG, [3641], [-0.5 1]);
Epoching...
Warning: event 1 out of data boundary
or
 >> epocheddata = epoch(EEG, [1:100000000], [-0.5 1]);
this produces 100000000 out of boundary warnings
Also, EEG is assigned by a seemingly successful call to:
EEG = loadcnt('myfile.cnt' , 'dataformat', 'int16');
where
EEG =
       header: [1x1 struct]
     electloc: [1x63 struct]
         data: [63x111280 double]
         Teeg: [1x1 struct]
        event: [1x101 struct]
          tag: 0
also, of all the fields in EEG.event:
ans =
1x101 struct array with fields:
     stimtype
     keyboard
     keypad_accept
     offset
     type
     code
     latency
     epochevent
     accept
     accuracy
only stimtype and offset have non zero values - is that a problem for epoch 
or pop_epoch?  When I load a file from the GUI, these extra messages are sent:
eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1 
= number of frames
eeg_checkset note: creating the original event table (EEG.urevent)
Creating a new dataset with index 1
Done.
In this EEG structure, EEG.event holds: 1x101 struct array with fields:
     type
     latency
     urevent
stimtype = type, but the associated latency values, event(1).latency might 
equal 3608, and event(1).offset (when the command line call is used) = 
3607.  Can I just set event(1).latency = event(1).offset for all events, 
and urevent = 1 for all events?
thanks,
Brian




More information about the eeglablist mailing list