[FieldTrip] intertrial coherence estimation

Eelke Spaak eelke.spaak at donders.ru.nl
Tue Nov 18 11:57:12 CET 2014


Dear Laura,

Indeed, it should work the way you specified. If you did not find any
other possible mistake in your script, could you file a bug on
bugzilla and attach a small snippet of data and your cfg that
reproduce the issue? Then we can look into it.

Best,
Eelke

On 12 November 2014 15:54, Laura Marzetti <laura.marzetti at gmail.com> wrote:
>
> Dear all,
>
> I want to compute the intertrial phase coherence and its variation across
> trials with a one taper hanning approach as in
>
>
>
> cfg = [];
>
>
>
> cfg.output     = 'fourier';
>
> cfg.channel    = 'all';
>
> cfg.method     = 'mtmconvol';
>
> cfg.taper = 'hanning';
>
> cfg.foi        = 5:2:80;
>
> cfg.t_ftimwin  = 5./cfg.foi;
>
> cfg.tapsmofrq  = 0.4*cfg.foi;
>
> cfg.toi        = time_vect;
>
> cfg.pad        = 'maxperlen';
>
> cfg.keeptrials = 'yes';
>
> % cfg.keeptapers = 'no';
>
> freqscprm = ft_freqanalysis(cfg, data);
>
> tmpdat = freqscprm.fourierspctrm;
>
>
>
> tmpdat = tmpdat./abs(tmpdat);
>
> itc = abs(mean(tmpdat));
>
>
>
>
>
> Nevertheless, the option cfg.keeptrials = 'yes'; does not seem to be applied
> and the output is already the average across trials, e.g. of size nfreq x
> ntimepoints and not of size ntrials x  nfreq x ntimepoints as I would have
> expected due to the settings for cfg.keeptrials.
>
>
>
> Can anyone suggest me how to manage the configuration in order to have
> estimates in each trial as an output?
>
>
>
> Thanks,
>
> Laura
>
>
> --
> Laura Marzetti, PhD
> Istituto di Tecnologie Avanzate Biomediche
> Università di Chieti "G. D'Annunzio"
> Via dei Vestini - Campus Universitario
> 66013 Chieti - ITALY
>
> phone: 0039-0871-3556944
> fax: 0039-0871-3556930




More information about the fieldtrip mailing list