[Eeglablist] eeglab function mergeset does weird things to the EEG.event data structure

abastos at berkeley.edu abastos at berkeley.edu
Mon Aug 14 16:25:58 PDT 2006


Hello all

I am having trouble merging 2 data sets that I have imported into eeglab
from biosemi using the bdf format. The problem is this: I have 2 datasets,
 both of which have intact .event structures. When I use the pop_mergeset
command to merge both, a bigger dataset is created. so far so good.

The problem occurs when I run my custom script to look at the .event
structure and toss out events that I wont use. When my script atempts to
access the EEG.event(index).type there is an error, indicating that the
data type is unexpectedly a string instead of a number. When I run my
script on the 2 independent set files prior to merging, everything is
fine. But after the merging, the EEG.event(index).type field is changed
from an integer to a character string.

A possible reason for this is that when both sets are appended, a new
event in between them is created which indicates the boundary between the
sets. This event is of type "boundary", which is a non-numerical type. So
in order to create this event with a character string in the type field,
all other type fields must be changed to character arrays to be
consistent.

To temporarily fix the problem, Im writing a script to convert all the
strings  back to numbers. Is anyone else having this problem?

Thanks

Andre
Roberston Lab, UC Berkeley




More information about the eeglablist mailing list