[FieldTrip] Error using ft_write_data

Robert Oostenveld r.oostenveld at donders.ru.nl
Thu Mar 10 11:36:14 CET 2022


Hi Yannick,

Coding different types of events in an EDF file is not trivial, that is why ft_write_data does not support it (as shown by the error). I suggest that you use the brainvision_eeg format, which results in a vhdr+vmrk+eeg triplet of files. That not only has the advantage of supporting events, but also that the binary representation of the EEG data is not limited to 16 bits (which is the case for EDF). 

best regards,
Robert




> On 9 Mar 2022, at 17:28, LONGUET Yannick via fieldtrip <fieldtrip at science.ru.nl> wrote:
> 
> Dear community,
> My name is Yannick Longuet and I am a master 2 student, working in ICM (Paris Brain institute) in Paris on Human intracranial-EEG data. 
> 
> I would like my dataset to follow the BIDS specification but my iEEG data are stored in the Poly5 format (TMSI). That's why I am looking to convert my i-EEG data in the European Data Format (EDF) 
> 
> I've been trying to use the ft_write_data() function for the conversion for several days but without success. 
> 
>  Here is my code : 
> filename_data='RUN01.Poly5'
> 
> cfg = [];
> cfg.dataset = filename_data;
> cfg.continuous = 'yes';
> cfg.chanel = 'all';
> data_unfilt  = ft_preprocessing(cfg);
> DATA=data_unfilt.trial;
> HEADER=ft_read_header(filename_data); 
> EVENT=ft_read_event(filename_data)
> 
> 
> ft_write_data('Youyfu.edf', DATA,'header',HEADER,'event',EVENT,'dataformat','edf')
> 
> And here is the error message : 
> 
> EVENT = 
> 
>   1×252 struct array with fields:
> 
>     type
>     sample
>     value
>     offset
>     duration
> 
> Error using ft_write_data (line 740)
> writing events is not supported
> 
> Do you have any idea what could be causing the problem?
> Any help would be appreciated. 
> 
> Best regards 
> 
> Yannick 
> 
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!5mdMNAikTzFHapBfN9d_ZNiiiCT00cULcQaiAdc-my-BoQ5i-YEYn1QAvpMTvJBZ-vyzIbIGAw-AqC-SSnVo72kTNhB5hQ$ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20220310/62e2bd04/attachment.htm>


More information about the fieldtrip mailing list