[FieldTrip] Problems with ft_app​ endata - merging dat​ asets​

styll at med.ovgu.de styll at med.ovgu.de
Mon Jul 9 15:51:41 CEST 2012


Hello,

I probably have a problem with the use of ft_appendata. I want to merge 4
MEG datasets (i.e. 4 runs, all the same number of channels, sampling rate,
etc.) of the same subject after I defined my trials of interest and
preprocessed the 4 datasets individually. If I use ft_databrowser for a
look into every single dataset, all trials (10 in each run/dataset) seems
to be OK with the correct sequence: defined prestim time range, trigger
and poststim time range. If I check the merged dataset I can go through
all of the 40 trials, but there is no sequence like: prestim time range,
trigger and poststim-time.
Here is my pipeline for the first steps:

%%%% run1
cfg.dataset='
\train01_64\run1\c,rfDC';
cfg.trialdef.prestim=1;      %%% in sec
cfg.trialdef.poststim=5;     %%% in sec
cfg.trialfun = 'traildef_train01_all_pics_run1';
data_run1 = ft_definetrial(cfg)

cfg.channel    = {'MEG'};
cfg.dftfilter='yes';
prepro_run_1 = ft_preprocessing(cfg)

%%%% run2
cfg.dataset='
\train01_64\run2\c,rfDC';
cfg.trialdef.prestim=1;      %%% in sec
cfg.trialdef.poststim=5;     %%% in sec
cfg.trialfun = 'traildef_train01_all_pics_run2';
data_run1 = ft_definetrial(cfg)

cfg.channel    = {'MEG'};
cfg.dftfilter='yes';
prepro_run_2 = ft_preprocessing(cfg)

the same for run3 and run4

%%%% merging the data
cfg=[];
merged_data = ft_appenddata(cfg, prepro_run_1, prepro_run_2, prepro_run_3,
prepro_run_4)

Do I miss something or is there in error in my pipeline or in my strategy


Best regards

Sascha





More information about the fieldtrip mailing list