[FieldTrip] concatenating data to a single trial data set

Eelke Spaak eelke.spaak at donders.ru.nl
Mon Jun 20 15:35:14 CEST 2011


Dear Andreas,

The way I concatenate data is just 'manually', so without the
intervention of FieldTrip. To do this, you will have to concatenate
the arrays in both the data.trial and the data.time cell array.

In pseudocode:

initialize matrix data_concat of size channels X total time points
initialize matrix time_concat of size 1 X total time points

loop over data.trial and data.time (have the same size)
  data_concat(:,appropriate time indices) = data.trial{k}(:,:);
  time_concat(1,appropriate time indices) = data.time{k}(:);
end loop

data.trial = data_concat;
data.time = time_concat;

That should do the trick. I would have provided actual code, were it
not that I am doing something slightly different from what you are
asking.

I hope this helps!

Best,
Eelke

2011/6/20 Andreas Wollbrink <a.wollbrink at uni-muenster.de>:
> Dear all,
>
> in order not to run into a RAM memory overload when performing an ICA on MEG
> data I subdivided the raw data into several equally long segments (chops)
> using ft_preprocessing with varying cfg.trl settings.
> After applying ft_componentanalysis to each of these chops I removed some
> (bad) components and backprojected the data to seperate data matrices using
> the following code:
>
> cfg = [];
> cfg.component = badCompVec; % to be removed component(s)
> dataCorr = ft_rejectcomponent(cfg, compData);
>
>
> Finally I like to concatenate these data to a continuous (single trial) data
> matrix in order to compare it with the original raw data set and perform the
> further timelock analysis on it.
>
> I tried using ft_appenddata for this issue. Doing so one gets a multi trial
> data matrix which I could not convert to single trial continuous data matrix
> using e.g. ft_redefinetrial.
>
> I would appreciate any help in how to solve this problem.
>
> Thanks in advance.
>
> Andreas Wollbrink
> --
>
>
> ======================================================================
>
>  Andreas Wollbrink, Biomedical Engineer
>
>  Institute for Biomagnetism and Biosignalanalysis
>  Muenster University Hospital
>
>  Malmedyweg 15         phone:   +49-(0)251-83-52546
>  D-48149 Muenster      mobil:   +49-(0)160-98527553
>  Germany               fax:     +49-(0)251-83-56874
>                        e-Mail: a.wollbrink at uni-muenster.de
>
> ======================================================================
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>




More information about the fieldtrip mailing list