[FieldTrip] from trials to continuous and an error in selfromraw

Eelke Spaak eelke.spaak at donders.ru.nl
Tue Aug 6 19:44:33 CEST 2013

Hi Ben,

The cfg.trials option for ft_freqanalysis refers to which trials
should be used in the computation of the output. By default,
ft_freqanalysis returns the average over all those trials. If you want
to get estimates for each individual trial, you should specify
cfg.keeptrials = 'yes'. (See also
http://fieldtrip.fcdonders.nl/reference/ft_freqanalysis .) I am not
sure if ft_singleplotTFR will give you plots for individual trials,
though; I think it will do the averaging anyway. To get individual
trial plots, you probably have to call the plotting function several
times with cfg.trials = 1, 2, 3, etc.

Regarding cfg.trials = '1', it is important to use just a regular
scalar quantity, and not a string, so cfg.trials = 1.


On 6 August 2013 17:56, van Lier  Ben <ben.vanlier at bsse.ethz.ch> wrote:
> Hi guys,
> for testing purposes im trying to use data in trials as one continuous piece of data. when i do freqanalysis with cfg.trials = 'all' and then singleplotTFR, i get to see only 1 trial. it should plot the spectra of all of them right? i do use cfg.continuous = yes
> i can tell it is processing all the trials in the command window feedback and databrowser is putting them together fine.
> i guess related, when i do cfg.trials = '1' (or any) and then freqanalysis it gives me the following error:
> --------------------------
> Error using selfromraw (line 13)
> incorrect specification of requested repetitions
> Error in ft_selectdata_old (line 547)
>     data = selfromraw(data, 'rpt', selrpt);
> Error in ft_selectdata (line 45)
>   [varargout{1:nargout}] = ft_selectdata_old(varargin{:});
> Error in ft_freqanalysis (line 225)
>   data = ft_selectdata(data, 'rpt', cfg.trials);
> ----------------------------
> i tried with data coming from ft_appendata (2 copies of the same file) and also with ft_definetrial from one continuous file.
> i am using the version of 5 aug 13
> anyone knows whats going wrong?
> cheers
> Ben
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

More information about the fieldtrip mailing list