[FieldTrip] Fwd: cfg

Stephen Clarke sclar028 at uottawa.ca
Tue Dec 30 16:55:47 CET 2014

---------- Forwarded message ----------
From: Stephen Clarke <stephen.elisha.clarke at gmail.com>
Date: Tue, Dec 30, 2014 at 10:11 AM
Subject: cfg
To: fieldtrip at science.ru.nl


A colleague and I are interested in using wavelets to analyze resting state
(rMEG) and working memory (tMEG) data from the Human Connectome Project, in
order to directly compare resting state and working memory conditions.

It appears that ft_freqanalysis.m works with the preprocessed HCP data. Our
question concerns the cfg structures.

For rMEG, the data.time structure is 1x147 cell, where each cell is a
1x1018 double, each going from 0 to 1.9995 (0.001966075273231 increments).

tMEG recordings have been divided into epochs for TIM (onset of image) and
TRESP (onset of response). The data.time structure is a 1x166 cell, where
each cell is a 1x2035 double, each going from -1.4996 to 2.4994 (0.002

If we use the same cfg.foi / cfg.toi inputs for each case, we get cfg.freq
structures which are not equivalent.

E.g., when using

% cfg = [];

% cfg.channel    = 'MEG';

% cfg.method     = 'wavelet';

% cfg.width      = 7;

% cfg.output     = 'pow';

% cfg.foi        = 1:0.01:100;

% cfg.toi        = -0.5:0.1:1.5;

The TFRwave.freq outputs using this code are:

 rMEG: cfg.freq --> size 1x200.

 tMEG: cgf.freq --> size  1x400.

As well, we get several warnings:

“the input is raw data with 244 channels and 144 trials”, which it is not
(it is preprocessed data).

“the trial definition in the configuration is inconsistent with the actual

“reconstructing sampleinfo by assuming that the trials are consecutive
segments of a continuous recording”

By using different cfg inputs to account for differences in the time
sampling for the resting and working memory data, we get similar errors,
though both output .freq structures are ~1x400 in this case.

%%for resting state cfg_rs

cfg_rs.foi        = 1:0.01:200;

cfg_rs.toi        = -1.5:0.002:2.5;

%%for wm data cfg_wm

cfg_wm.foi        = 1:0.01:100;

cfg_wm.toi        = 0:0.0019:2;

Any advice on appropriate configuration structures for wavelet analysis of
this data would be greatly appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141230/91c8c52d/attachment-0001.html>

More information about the fieldtrip mailing list