Back to the main page.

Bug 536 - ft_connectivityanalysis does not accept wavelet/fourier input

Reported 2011-03-17 00:46:00 +0100
Modified 2011-03-18 00:40:19 +0100
Product: FieldTrip
Component: specest
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Matt Mollison - 2011-03-17 00:46:33 +0100

I'm using fieldtrip-20110315 on a Mac Pro running MATLAB 7.11 and OS X 10.6.6. ft_connectivityanalysis does not accept input from ft_freqanalysis when cfg.method='wavelet', cfg.output='fourier', cfg.keeptrials='yes', cfg.keeptapers='yes'. I get this error: ??? Reference to non-existent field 'cumtapcnt'. Error in ==> ft_checkdata>fixcsd at 833 nrpt = length(data.cumtapcnt); Error in ==> ft_checkdata at 594 data = fixcsd(data, cmbrepresentation, channelcmb); Error in ==> univariate2bivariate at 29 data = ft_checkdata(data, 'cmbrepresentation', 'full'); Error in ==> ft_connectivityanalysis at 234 [data, powindx, hasrpt] = univariate2bivariate(data, 'fourierspctrm', 'crsspctrm', dtype, 'cmb', cfg.channelcmb); It works when cfg.output='powandcsd', as seen in If I may ask a question in this bug report, what's so bad about wavelets? Or to put it a different way, why do you (J-M Schoffelen) prefer multitapers? I'm fine with using multitapers instead of wavelets, and I read in van Vugt et al., 2007 (J Neurosci Methods) that multitapers are frequency sensitive, which sounds like a good thing. I was using wavelets for testing my scripts because there were fewer setup options, but if I actually decide to use multitapers, I'm confused about how to choose between dpss, hanning, etc. I guess I need to do some learning and testing on my own (they don't call it reSEARCH for nothing). Let me know if you need more info. Cheers, Matt

Jan-Mathijs Schoffelen - 2011-03-17 14:16:12 +0100

It should do so now. I had to make some small changes to ft_checkdata, and ft_freqanalysis to fix it. Moreover, I committed some small changes to ft_connectivityanalysis which attempt to address some issues (which ones I forgot)... I generally prefer multitapers because they allow for better control of the time-frequency trade-off, whereas the time-frequency trade off for wavelets is static, and defined by only 1 parameter, the width. With multitapers you can separately address the time sensitivity (t_ftimwin), and the frequency sensitivity (tapsmofrq)

Matt Mollison - 2011-03-18 00:40:19 +0100

Looks like this is fixed, ft_connectivityanalysis runs on wavelet data. And thanks for the multitaper insight. Matt