<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Thomas,<br>
<br>
that is indeed a bug that we are currently working on, see also
here:<br>
<a class="moz-txt-link-freetext" href="http://bugzilla.fcdonders.nl/show_bug.cgi?id=2148">http://bugzilla.fcdonders.nl/show_bug.cgi?id=2148</a><br>
<br>
A workaround for the moment is to call this:<br>
<pre class="bz_comment_text" id="comment_text_5"> coh.dimord = 'chancmb_freq';
coh = ft_checkdata(coh, 'cmbrepresentation', 'full');
</pre>
<br>
As you asked what the difference between the two is:<br>
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.<br>
<br>
Btw, I am not aware that you can define cfg.labelcmb in any
function, imho it is always cfg.channelcmb.<br>
<br>
Best,<br>
Jörn<br>
<br>
<br>
On 5/31/2013 11:42 AM, Wunderle, Thomas wrote:<br>
</div>
<blockquote
cite="mid:27E5CAD9145EEC41BB9B34C01716A1983046156B@UM-EXCDAG-A01.um.gwdg.de"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:12.0pt">I’m new in fieldtrip and I try to
get the cfg.</span><span
style="font-size:12.0pt;color:black">channelcmb to work,
because I want to plot the connectivity between the channels
of different laminar electrodes,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:12.0pt;color:black">let’s say the
connectivity between channel 1:24 and 25:38</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried the following:<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">cfg = [];</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">cfg.method =
</span><span style="font-size:10.0pt;font-family:"Courier
New";color:#A020F0">'mtmfft'</span><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">;</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">cfg.taper =
</span><span style="font-size:10.0pt;font-family:"Courier
New";color:#A020F0">'dpss'</span><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">;</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">cfg.output =
</span><span style="font-size:10.0pt;font-family:"Courier
New";color:#A020F0">'fourier'</span><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">;</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">cfg.tapsmofrq = 1;</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">freq = ft_freqanalysis(cfg,
data)</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal">The output is:<o:p></o:p></p>
<p class="MsoNormal">>> freq <o:p></o:p></p>
<p class="MsoNormal">freq = <o:p></o:p></p>
<p class="MsoNormal"> label: {3x1 cell}<o:p></o:p></p>
<p class="MsoNormal"> dimord: 'rpttap_chan_freq'<o:p></o:p></p>
<p class="MsoNormal"> freq: [1x101 double]<o:p></o:p></p>
<p class="MsoNormal"> fourierspctrm: [500x3x101
double]<o:p></o:p></p>
<p class="MsoNormal"> cumsumcnt: [500x1 double]<o:p></o:p></p>
<p class="MsoNormal"> cumtapcnt: [500x1 double]<o:p></o:p></p>
<p class="MsoNormal"> cfg: [1x1 struct]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I then run <o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black"> </span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier New"">cfg
= [];</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier New"">cfg.method
= 'coh';</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier New"">cfg.channelcmb
= {freq.label{1} freq.label{2};freq.label{2}
freq.label{1}};
</span><span style="font-size:12.0pt;font-family:"Courier
New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier New"">coh=
ft_connectivityanalysis(cfg, freq);</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And the output here is:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">>> coh<o:p></o:p></p>
<p class="MsoNormal">coh = <o:p></o:p></p>
<p class="MsoNormal"> labelcmb: {2x2 cell}<o:p></o:p></p>
<p class="MsoNormal"> dimord: 'chan_freq'<o:p></o:p></p>
<p class="MsoNormal"> cohspctrm: [2x101 double]<o:p></o:p></p>
<p class="MsoNormal"> freq: [1x101 double]<o:p></o:p></p>
<p class="MsoNormal"> dof: 500<o:p></o:p></p>
<p class="MsoNormal"> cfg: [1x1 struct]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As you can seen, the output of dimord is
‘chan_freq’ so in the subsequent call of
<span style="font-size:10.0pt;font-family:"Courier
New";color:black">ft_connectivityplot I get an error
message:</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">cfg = [];</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">cfg.parameter =
</span><span style="font-size:10.0pt;font-family:"Courier
New";color:#A020F0">'cohspctrm'</span><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">;</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:10.0pt;font-family:"Courier
New";color:black">ft_connectivityplot(cfg, coh);</span><span
style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">??? Error using ==> ft_connectivityplot
at 99<o:p></o:p></p>
<p class="MsoNormal">the data should have a dimord of
chan_chan_freq or chancmb_freq<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">If I use in
</span><span style="font-size:12.0pt;color:black">ft_freqanalysis
the cfg.method = ‘powandcsd’,
</span><span style="font-size:12.0pt">cfg.channelcmb seems to
have no effect at all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">the
coherence is computed for all possible pairs.</span><span
style="font-size:12.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I also don’t understand the difference
between “<span style="font-size:12.0pt">cfg.channelcmb” and
“cfg.labelcmb”</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can you help me in how I should correctly
use the cannelcmb and labelcmb options?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your help,<o:p></o:p></p>
<p class="MsoNormal">Thomas<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE">-----<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE">Dr.
Thomas Wunderle<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"><a
moz-do-not-send="true"
href="http://www.ncbi.nlm.nih.gov/feed/rss.cgi?ChanKey=PubMedNews"><span
style="color:windowtext;text-decoration:none" lang="DE">Ernst
Strüngmann Institute (ESI) for Neuroscience</span></a></span><span
style="font-family:"Arial","sans-serif""
lang="DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"><a
moz-do-not-send="true"
href="http://www.ncbi.nlm.nih.gov/feed/rss.cgi?ChanKey=PubMedNews"><span
style="color:windowtext;text-decoration:none">in
Cooperation with Max Planck Society
</span></a></span><span style="font-size:9.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE">Deutschordenstrasse
46</span><span lang="DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE">60528
Frankfurt am Main, Germany</span><span lang="DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE"><a
moz-do-not-send="true" href="http://www.esi-frankfurt.de/"><span
style="color:blue">www.esi-frankfurt.de</span></a></span><span
lang="DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE"><a
moz-do-not-send="true"
href="mailto:thomas.wunderle@esi-frankfurt.de"><span
style="color:blue">thomas.wunderle@esi-frankfurt.de</span></a></span><span
lang="DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE">Tel:
+49 69 96769 519<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE">Fax:
+49 69 96769 555<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt" lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:gray"
lang="DE">Sitz der Gesellschaft: Frankfurt am Main<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:gray"
lang="DE">Registergericht: Amtsgericht Frankfurt - HRB 84266<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:gray"
lang="DE">Geschäftsführer: Prof. Dr. Pascal Fries<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fieldtrip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
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: <a class="moz-txt-link-abbreviated" href="mailto:jm.horschig@donders.ru.nl">jm.horschig@donders.ru.nl</a>
Tel: +31-(0)24-36-68493
Web: <a class="moz-txt-link-freetext" href="http://www.ru.nl/donders">http://www.ru.nl/donders</a>
Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands</pre>
</body>
</html>