[FieldTrip] access to GDF file

Sina Makhdoomi Kaviri sinam1 at umbc.edu
Thu May 2 19:04:59 CEST 2024


I want to add this note that if I uploaded the dataset into the fieldtrip
directly, it does not recognize the dataset related to specific event type.
Please help me how can I access the event code in this dataset and
separate it to process in the beamforming method. Here is my code:
dataset = './dataset/S03_ME/motorexecution_subject3_run1.gdf';
cfg = [];
cfg.dataset = dataset;
cfg.trialdef.eventtype = '1541'; % get a list of the available types
cfg.trialfun = 'ft_trialfun_general';
cfg.trialdef.triallength = 1; % duration in seconds
cfg = ft_definetrial(cfg);
cfg.dftfreq = [50];
cfg.channel = 'EEG';
data_segmented = ft_preprocessing(cfg);


On Thu, May 2, 2024 at 11:16 AM Sina Makhdoomi Kaviri <sinam1 at umbc.edu>
wrote:

> To whom it may concern,
>
> I want to implement, "A novel explainable machine learning approach for
> EEG-based brain computer interface systems" published in Springer Nature,
> in fieldtrip. Regarding that they used (
> http://bnci-horizon-2020.eu/database/data-sets (Accession Number
> 001-2017)) as dataset in GDF file, I want to preprocess and use
> ft_definetrial, but it is not accessed to the event code. In this regard I
> use EEGLAB to load the dataset with biosig, after that when I convert to
> fieldtrip (eeglab2fieldtrip or save it and use ft_read_event,..) I face
> this problem as follows. Could you please help me how can I preprocess this
> dataset for beamforming source localization for specific event code.
>
> Error using isfolder
> Input path must be text.
>
> Error in ft_filetype (line 166)
> if isfolder(filename)
>
> Error in dataset2files (line 42)
>   format = ft_filetype(filename);
>
> Error in ft_checkconfig (line 675)
>     [cfg.dataset, cfg.headerfile, cfg.datafile] =
> dataset2files(cfg.dataset, []);
>
> Error in ft_preprocessing (line 385)
>   cfg = ft_checkconfig(cfg, 'dataset2files', 'yes');
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240502/b8b3b871/attachment.htm>


More information about the fieldtrip mailing list