[FieldTrip] channel combination problems
"Jörn M. Horschig"
jm.horschig at donders.ru.nl
Mon Jun 3 10:59:49 CEST 2013
Hi Thomas,
that is indeed a bug that we are currently working on, see also here:
http://bugzilla.fcdonders.nl/show_bug.cgi?id=2148
A workaround for the moment is to call this:
coh.dimord = 'chancmb_freq';
coh = ft_checkdata(coh, 'cmbrepresentation', 'full');
As you asked what the difference between the two is:
Connectivity measures are define between two signals, or channels. So,
for example you compute coherence between channel1 and channel2. In
FieldTrip there are two ways to represent this: Either by a 3D NxMxF
matrix or by a 2D (NxM)xF matrix, where F denotes the frequency
dimension and N and M are the in- or output channels (coherence is a
symmetric measure, so N=M). In other words, we can either represent it
as a three dimensional matrix, where the first dimension denotes the
input and the second the output channels, or we represent it as a two
dimensional matrix, where the first dimension denotes the relation
between in- and output channels. The latter is what we call a
channelcombination (chancmb). It can be channel1->channel2 (meaning,
influence from channel1 to channel 2). The same in a three dimensional
matrix would be channel1 for dimension 1 and channel 2 for dimension 2.
The workaround above converts from one to the other convention. If your
data is in 'cmbrepresentation;, you will have 'labelcmb' which is a 2D
cell-matrix, and your data dimensions (dimord) will be 'chancmb_XXX',
where a single dimension respective to labelcmb defines the channel
combination. If your data is not in 'cmbrepresentation', you will have a
1D 'label' field and your data dimension (dimord) will be
'chan_chan_XXX', this a 2D channel combinations that explains the
channel combination.
Btw, I am not aware that you can define cfg.labelcmb in any function,
imho it is always cfg.channelcmb.
Best,
Jörn
On 5/31/2013 11:42 AM, Wunderle, Thomas wrote:
>
> Hi all,
>
> I'm new in fieldtrip and I try to get the cfg.channelcmb to work,
> because I want to plot the connectivity between the channels of
> different laminar electrodes,
>
> let's say the connectivity between channel 1:24 and 25:38
>
> I tried the following:
>
> cfg = [];
>
> cfg.method = 'mtmfft';
>
> cfg.taper = 'dpss';
>
> cfg.output = 'fourier';
>
> cfg.tapsmofrq = 1;
>
> freq = ft_freqanalysis(cfg, data)
>
> The output is:
>
> >> freq
>
> freq =
>
> label: {3x1 cell}
>
> dimord: 'rpttap_chan_freq'
>
> freq: [1x101 double]
>
> fourierspctrm: [500x3x101 double]
>
> cumsumcnt: [500x1 double]
>
> cumtapcnt: [500x1 double]
>
> cfg: [1x1 struct]
>
> I then run
>
> cfg = [];
>
> cfg.method = 'coh';
>
> cfg.channelcmb = {freq.label{1} freq.label{2};freq.label{2}
> freq.label{1}};
>
> coh= ft_connectivityanalysis(cfg, freq);
>
> And the output here is:
>
> >> coh
>
> coh =
>
> labelcmb: {2x2 cell}
>
> dimord: 'chan_freq'
>
> cohspctrm: [2x101 double]
>
> freq: [1x101 double]
>
> dof: 500
>
> cfg: [1x1 struct]
>
> As you can seen, the output of dimord is 'chan_freq' so in the
> subsequent call of ft_connectivityplot I get an error message:
>
> cfg = [];
>
> cfg.parameter = 'cohspctrm';
>
> ft_connectivityplot(cfg, coh);
>
> ??? Error using ==> ft_connectivityplot at 99
>
> the data should have a dimord of chan_chan_freq or chancmb_freq
>
> If I use in ft_freqanalysis the cfg.method = 'powandcsd',
> cfg.channelcmb seems to have no effect at all,
>
> the coherence is computed for all possible pairs.
>
> I also don't understand the difference between "cfg.channelcmb" and
> "cfg.labelcmb"
>
> Can you help me in how I should correctly use the cannelcmb and
> labelcmb options?
>
> Thanks for your help,
>
> Thomas
>
> -----
>
> Dr. Thomas Wunderle
>
> Ernst Strüngmann Institute (ESI) for Neuroscience
> <http://www.ncbi.nlm.nih.gov/feed/rss.cgi?ChanKey=PubMedNews>
>
> in Cooperation with Max Planck Society
> <http://www.ncbi.nlm.nih.gov/feed/rss.cgi?ChanKey=PubMedNews>
>
> Deutschordenstrasse 46
>
> 60528 Frankfurt am Main, Germany
>
> www.esi-frankfurt.de <http://www.esi-frankfurt.de/>
>
> thomas.wunderle at esi-frankfurt.de <mailto:thomas.wunderle at esi-frankfurt.de>
>
> Tel: +49 69 96769 519
>
> Fax: +49 69 96769 555
>
> Sitz der Gesellschaft: Frankfurt am Main
>
> Registergericht: Amtsgericht Frankfurt - HRB 84266
>
> Geschäftsführer: Prof. Dr. Pascal Fries
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands
Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel: +31-(0)24-36-68493
Web: http://www.ru.nl/donders
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130603/2a304729/attachment-0001.html>
More information about the fieldtrip
mailing list