[FieldTrip] structure of 'data' argument for ft_preprocessing

Dave Britton dave at davebritton.com
Fri Jan 18 05:20:02 CET 2013

What is the structure required for the 'data' argument to
"function [chansel, trlsel, cfg] = rejectvisual_trial(cfg, data): "?
I am not getting meaningful results from passing the output of 
[data]=ft_preprocessing(cfg, data) into rejectvisual_trial(data). All 
that appears in the resulting figure is the names of the channels, with 
no graphs
of trial epochs appearing below them as it should be.

What ft_preprocessing returns is:
data =

          label: {128x1 cell}
           time: {132x1 cell}
          trial: {132x1 cell}
        fsample: NaN
            cfg: [1x1 struct]
     sampleinfo: [132x2 double]

where I have 128 electrodes and 132 trials of 238 samples each. When 
this is passed to ft_rejectvisual(cfg,data) a figure appears that shows 
the labels of the 128 electrodes, but there is no graph under each label 
showing the EEG data.
What I am passing into ft_preprocessing may be incorrectly structured, I 
suspect. This is
data =

     label: {128x1 cell}
      time: {132x1 cell}
     trial: {132x1 cell}

(specifically, why are these all cells instead of arrays?  What is the 
structure of data.time, and of data.trial?)

where label is the cell array of strings of electrode names, time is a 
cell array of the 132 trials' starting times in the .cnt EEG data file, 
and trial is a cell array containing the 132 cell arrays of the 
corresponding {128 x 283} EEG samples.

Where am I going wrong? What does ft_rejectvisual(data) expect to have 
as the structure for "data"?


More information about the fieldtrip mailing list