[FieldTrip] difficulty in loading BCI-IV-2a dataset into fieldtrip for preprocessing
Muhammad Naveed Iqbal Qureshi
mniqureshi at gist.ac.kr
Thu Jan 21 13:59:06 CET 2016
Hi,
I am using BCI competition IV dataset 2a for my experiment.
I want to preprocess it with field trip.
I have written the following code for this task.
addpath(genpath('E:\bbci_data\fieldtrip-20160118\fieldtrip-20160118'));
cd 'E:\bbci_data\BCICIV_2a_gdf\';
%% Field Trip preprocessing code
for i=1:9
file=num2str(i);
file=strcat('A0',file,'T.gdf');
cfg = [];
cfg.dataset = file ;
cfg.trialdef.eventtype = 'Stimulus';
cfg.trialdef.eventvalue = {'left', 'right', 'both feet', 'tongue'};
cfg.trialdef.triallength = 8; % duration in seconds
cfg.trialdef.ntrials = inf; % number of trials, inf
results in as many as possible
cfg.trialdef.prestim = 3;
cfg.trialdef.poststim = 6;
cfg = ft_definetrial(cfg);
cfg.bpfilter = 'yes';
cfg.bpfreq = [0.5 100];
cfg.bpfilttype = 'but';
cfg.bpfiltord = 5;
cfg.demean = 'yes';
cfg.detrend = 'yes';
trialdata_EO{i} = ft_preprocessing(cfg);
end
However, this code does not import the event and trigger information from
the header file of the data.
I will be highly obliged if anyone can help me in this regard.
Thank in advance.
Best Regards,
Muhammad Naveed Iqbal Qureshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160121/1dbb2d2d/attachment-0001.html>
More information about the fieldtrip
mailing list