[Eeglablist] question about importing event info to continuous EEG

Keng-Yu Lin linkengyulky at gmail.com
Sat Jul 27 07:30:04 PDT 2024


Hi, everyone,

Sorry for cross-posting (if you are also subscribers in ERPLAB mailing
list). I got a problem importing event info (From MATLAB array or ASCII
file) to my continuous EEG data. I wondered if anyone had encountered the
same issue before and got it fixed. Please see my elaborations below.

There are some missing (but predictable) event triggers in my continuous
EEG data and I'm trying to restore these triggers, such that I can secure
more epochs in later analysis. The following is what I did.

   1. After importing the *.cnt file, I obtained *.txt files with the event
   trigger information by "File > Export > Events to text file". Note: the
   latency I obtained in the *.txt files is samples (rather than seconds or
   milliseconds).
   2. Then, I looked at the *.txt file and located where the missing event
   triggers should be. I added/restored the missing event triggers manually
   (as they are predictable relative to other existing event triggers).
   3. After correcting the *.txt file, I tried to import the corrected
   *.txt file and apply it to the same continuous EEG data by "File > Import
   event info > From MATLAB array or ASCII file", hoping to update the event
   trigger information to restore the missing event triggers. The following
   are the parameters I specified.

   Input field (column) names: type latency duration
   Number of file header lines: 1
   Time unit (sec): NaN
   Align event latencies to data events: 0
   Auto adjust new event sampling rate: checked

   4. After step3, the "Events" row was updated (from 1433 to 1436) in the
   EEGLAB window; please see screenshots below. However, when I tried to look
   at the data by "Plot > Channel data (scroll)", I got an error(?) message
   and could not view it in the plot. The message showed "Arrays have
   incompatible sizes for this operation", which I believe is because I
   added/restored the missing triggers manually (in this example, 3 missing
   triggers were added/restored).

   I wondered (1) if there's any concern regarding the steps above (e.g.,
   messing up the data) and (2) how I can fix the error regarding viewing the
   data in the plot (is it just a display issue? or is there any serious
   concern that causes data distortion?).

   BTW, I have also tried "Edit > Event values" to restore the missing
   triggers and viewed the edited version in the plot. This worked but I'll
   have to do it manually for each subject as I haven't figured out how I can
   do it using scripts, especially when the missing event triggers are random
   (in latency and in number) across subjects. I think this would be the last
   resort for me to restore the missing event triggers manually, as it can be
   error-prone for 70 subjects.


   [image: image.png]
   [image: image.png]
   [image: image.png]

Thanks a lot in advance!

Best,
Keng-Yu


More information about the eeglablist mailing list