[FieldTrip] intertrial coherence estimation

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at fcdonders.ru.nl
Tue Nov 18 13:46:40 CET 2014


Please don’t file a bug on bugzilla because it’s a misconception that intertrial coherence can be estimated at the level of the single trials and not a bug. By definition it is defined across trials (as multiple previous threads on this list have discussed). If you want to get a variance estimate, you should use a jackknife approach or something similar. The only reason why I can think of you ending up without more than 1 trial in the output of ft_freqanalysis is that you only had 1 trial in the input. If you want to get multiple ’trials’ from a single long trial, please use ft_redefinetrial and subsequently cfg.method = ‘mtmfft’ in ft_freqanalysis. 

Jan-Mathijs


On Nov 18, 2014, at 11:57 AM, Eelke Spaak <eelke.spaak at donders.ru.nl> wrote:

> 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
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list