[Eeglablist] Bug in pop_writeeeg() function ?

Cedric Cannard ccannard at protonmail.com
Wed Jun 12 11:38:06 PDT 2024


Hi Pierre,

My intuition is that the event type (i.e. label) may be converted from character string to numerical or expected to be character but is numerical, or something like that. 

When using the GUI, did you try modifying the field "event mode import"?
See help bdf2biosig_events to learn about the different options. 

Also, you can try the last checkbox "alternative method using mexSLOAD" to see if it works better for your data. 

Cedric



On Wednesday, June 12th, 2024 at 2:14 AM, Pierre Vigneron via eeglablist <eeglablist at sccn.ucsd.edu> wrote:

> Hello the EEGLab community,
> 
> i'm using EEGLab 2023.0 and I experience a strange behaviour when I load
> and save a BDF file without altering it : the triggers are NOT the same.
> 
> Here is a very minimal example, based on the test.bdf file provided by
> EEGLab. Please note that I experience the VERY SAME issue when using the
> EEG GUI (File > Import and File > Export...)
> 
> 
> ------------------------------
> 
> clearvars
> close all
> 
> % This script tests the EEGLab BDF Read/Write functions
> 
> 
> f_in = '/opt/eeglab2023.0/sample_data/test_data/test.bdf';
> f_out = './test_out.bdf';
> 
> eeglab nogui
> eeg_in = pop_biosig(f_in);
> 
> pop_writeeeg(eeg_in, f_out, 'TYPE','BDF');
> eeg_out = pop_biosig(f_out);
> 
> eeg_in.event(1)
> eeg_out.event(1)
> 
> ------------------------------
> 
> The first event in eeg_in is :
> 
> struct with fields:
> 
> type: 254
> latency: 257
> urevent: 1
> 
> While the first event in eeg_out is :
> 
> struct with fields:
> 
> type: 10170
> latency: 257
> urevent: 1
> 
> As you can see, the type has changed !
> 
> Have you some clue about what's happening here ?
> 
> Thanks a lot for any advice !
> 
> BR
> 
> Pierre
> 
> P.S : this is a reupload (slightly updated) of my previous message (sent
> two days ago) because it does not appeared on the list, strangely ??
> 
> --
> Pierre Vigneron, PhD
> Ingénieur de Recherche mutualisé Modyco <https://urldefense.com/v3/__https://modyco.fr__;!!Mih3wA!BheMdsqDywo60rOkc7FRMy6f_ySs5iBKz8baZGGrLxif9eNe-wmTeTfmi0OYY9wy_b8dtcAo7Q89CHvS9opuH1E3y5zUNdk$ > / EconomiX
> 
> <https://urldefense.com/v3/__https://economix.fr__;!!Mih3wA!BheMdsqDywo60rOkc7FRMy6f_ySs5iBKz8baZGGrLxif9eNe-wmTeTfmi0OYY9wy_b8dtcAo7Q89CHvS9opuH1E3FNR1f5c$ >
> 
> Université de Paris Nanterre
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to eeglablist-request at sccn.ucsd.edu


More information about the eeglablist mailing list