<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1498474180015_5040">Hi Maria,</div><div id="yui_3_16_0_ym19_1_1498474180015_5039"><br></div><div id="yui_3_16_0_ym19_1_1498474180015_5043" dir="ltr"><span id="yui_3_16_0_ym19_1_1498474180015_5087">for obtaining the sources timecourses (aka virtual channels) you can follow the tutorials pasted below. <br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1498474180015_5575"><span id="yui_3_16_0_ym19_1_1498474180015_5087"><br></span></div><div dir="ltr"><span id="yui_3_16_0_ym19_1_1498474180015_5087">Best,</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1498474180015_5613"><span id="yui_3_16_0_ym19_1_1498474180015_5087">Maité<br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1498474180015_5135"><span id="yui_3_16_0_ym19_1_1498474180015_5087"><br></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1498474180015_5186"><span id="yui_3_16_0_ym19_1_1498474180015_5087"><a href="http://www.fieldtriptoolbox.org/tutorial/connectivity#extract_the_virtual_channel_time-series" class="" id="yui_3_16_0_ym19_1_1498474180015_5184">http://www.fieldtriptoolbox.org/tutorial/connectivity#extract_the_virtual_channel_time-series</a><br></span></div><div id="yui_3_16_0_ym19_1_1498474180015_5247"><br></div><div id="yui_3_16_0_ym19_1_1498474180015_5309" dir="ltr"><a href="http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors#extract_the_virtual_channel_time-series" id="yui_3_16_0_ym19_1_1498474180015_5317" class="">http://www.fieldtriptoolbox.org/tutorial/shared/virtual_sensors#extract_the_virtual_channel_time-series</a><br></div><div id="yui_3_16_0_ym19_1_1498474180015_5325"><br></div><div id="yui_3_16_0_ym19_1_1498474180015_5392"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1498474180015_5299"><span id="yui_3_16_0_ym19_1_1498474180015_5087"></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> El Lunes 26 de junio de 2017 12:02, Maria Hakonen <maria.hakonen@gmail.com> escribió:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv8679590186"><div><div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0);">Hi Maria,
maybe in this case it is better that you export the sources timecourses, build a data matrix with them and treat them in the same way as you did with the channels. 

Best,Maité 
</pre><div><br clear="none"></div><div>Hi <span style="color:rgb(0,0,0);white-space:pre-wrap;">Maité</span>,</div><div><br clear="none"></div><div>Could you please yet let me know how to get the sources timecources? source = ft_sourceanalysis(cfg, freq); only gives  </div><div><div>source = </div><div><br clear="none"></div><div>         freq: 18</div><div>    cumtapcnt: [180x1 double]</div><div>          dim: [19 15 15]</div><div>       inside: [4275x1 logical]</div><div>          pos: [4275x3 double]</div><div>       method: 'average'</div><div>          avg: [1x1 struct]</div><div>          cfg: [1x1 struct]</div></div><div><br clear="none"></div><div>Best,</div><div>Maria</div></div><div class="yiv8679590186gmail_extra"><br clear="none"><div class="yiv8679590186gmail_quote">2017-06-25 13:53 GMT+03:00 Maria Hakonen <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:maria.hakonen@gmail.com" target="_blank" href="mailto:maria.hakonen@gmail.com">maria.hakonen@gmail.com</a>></span>:<br clear="none"><div class="yiv8679590186yqt1749438059" id="yiv8679590186yqt42843"><blockquote class="yiv8679590186gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div class="yiv8679590186gmail_quote"><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font face="tahoma, sans-serif">Hi Maité,</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font face="tahoma, sans-serif">Thank you for your answer!</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font face="tahoma, sans-serif">I have managed to calculate the coherence between two conditions in the sensor space in the way you suggested. However, I haven't managed to calculate the coherence between conditions in the source space (i.e. Appendix 1 in <a rel="nofollow" shape="rect" target="_blank" href="http://www.fieldtriptoolbox.org/tutorial/coherence">http://www.fieldtriptoolbox. org/tutorial/coherence</a>). ft_sourceanalysis doesn't have channelcmb. I wonder if anyone has any solutions for this?</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font face="tahoma, sans-serif">BTW. I didn't get the answer to my question in my email but found it from Fieldtrip archive. However, I have also got some other emails from fieldtrip discussion forum.</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font face="tahoma, sans-serif">Best,</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><font face="tahoma, sans-serif">Maria</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0);"><br clear="none"></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0);">Hi Maria,
Here it is a possible solution. First, rename channels from one of both conditions: for example, for condition 2, {'ch01cond2', 'ch02cond2', ...}. Then, append the data from both conditions. In ft_freqanalysis introduce all the channels combinations you want: 

cfg.channel    = {'MEG' 'ch01cond2' 'ch02cond2' ...};
cfg.channelcmb = {'ch01' 'ch01cond2'; 'ch02' 'ch02cond2'};
As I understand, you could use the same channelcmb later on in ft_connectivityanalysis.
I hope it helps.
Best wishes,Maité</pre><div><div class="yiv8679590186h5"><br clear="none"><br clear="none"><div dir="ltr"><div><div><div>Dear FieldTrip experts,<br clear="none"><br clear="none"></div>I have just started to use Fieldtrip and would like to estimate coherence between MEG responses measured in two different conditions from the same cortical areas. The example in Appendix 1 is close to what I would like to do:<br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://www.fieldtriptoolbox.org/tutorial/coherence">http://www.fieldtriptoolbox.or g/tutorial/coherence</a><br clear="none"><br clear="none"></div>However, in the example, coherence is calculated between the reference signal (EMG) and all MEG channels. Could it be possible to calculate coherence between each MEG channel in one condition and the same MEG channels in the other condition, that is: <br clear="none">ch1 in cond1 vs. ch1 in cond2, ch2 in cond1 vs. ch2 in cond2, ... <br clear="none"><br clear="none"></div>As far as I understand, the example in Appendix 1 would do this: <br clear="none"><div><div>ch1 in cond1 vs. all channels in cond2, ch2 in cond ch1 all channels in cond2, ...<br clear="none"><br clear="none"></div><div>Best,<br clear="none"></div><div>Maria<br clear="none"></div></div></div>
</div></div></div><br clear="none"></div>
</blockquote></div></div><br clear="none"></div></div></div><div class="yqt1749438059" id="yqt46713">_______________________________________________<br clear="none">fieldtrip mailing list<br clear="none"><a shape="rect" ymailto="mailto:fieldtrip@donders.ru.nl" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br clear="none"><a shape="rect" href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div><br><br></div>  </div> </div>  </div></div></body></html>