<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
When you call ft_freqanalysis with ‘fourier’ in the cfg.method, followed by ft_sourceanalysis with ‘pcc’ in cfg.method, the source.avg.mom contains the fourier coefficients at the single taper level. A bunch of tapers constitute a single trial, the number of
 which depends on the smoothing parameter that you used in ft_freqanalysis.
<div class=""><br class="">
</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
J.M.Schoffelen, MD PhD<br class="">
Senior Researcher, VIDI-fellow - PI, language in interaction<br class="">
Telephone: +31-24-3614793</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Physical location: room 00.028</div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 2 Feb 2018, at 01:12, Yaocong Duan <<a href="mailto:yaocong.duan@gmail.com" class="">yaocong.duan@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi Stephen,
<div class=""><br class="">
</div>
<div class="">Thank you for your response. I write something wrong in my previous email. the freq structure does have trails information. but then I do a source reconstruction and generate a source structure. phase locking value is calculated from the source structure
 directly. However, the source structure does not have any trails info (trails seems have been averaged).</div>
<div class=""><br class="">
</div>
<div class="">source = ft_sourceanalysis(cfg, freq);</div>
<div class="">...</div>
<div class="">plv = ft_connectivityanalysis(cfg, souceSparse);</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">below are the freq structure generated by freq analysis, source structure generated by source analysis as well as the .avg field of source structure.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span id="cid:ii_16153c4d925092f4"><image.png></span><span id="cid:ii_16153c69947c23c4"><image.png></span><span id="cid:ii_16153c95327ecf63"><image.png></span><br class="">
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On 1 February 2018 at 18:02, Stephen Whitmarsh <span dir="ltr" class="">
<<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank" class="">stephen.whitmarsh@gmail.com</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="">Dear <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">Yaocong,</span>
<div class=""><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><br class="">
</span></div>
<div class=""><span style="font-size:12.8px" class="">To understand your question, it would be helpful if you post the output of the freqanalysis, i.e. your
<i class="">freq </i>datastructure. It should contain a .<i class="">pow </i>field, which should be an array of structs, numbering your number of trials, right?</span></div>
<div class=""><span style="font-size:12.8px" class=""><br class="">
</span></div>
<div class=""><span style="font-size:12.8px" class="">Cheers,</span></div>
<div class=""><span style="font-size:12.8px" class="">Stephen</span></div>
</div>
<div id="m_6562418138207874494DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" class=""><br class="">
<table style="border-top:1px solid #d3d4de" class="">
<tbody class="">
<tr class="">
<td style="width:55px;padding-top:13px" class=""><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon" target="_blank" class=""><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width:46px;height:29px" class=""></a></td>
<td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px" class="">
Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link" style="color:#4453ea" target="_blank" class="">
www.avast.com</a> </td>
</tr>
</tbody>
</table>
<a href="x-msg://157/#m_6562418138207874494_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1" class=""></a></div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">
<div class="">
<div class="h5">On 1 February 2018 at 18:31, Yaocong Duan <span dir="ltr" class="">
<<a href="mailto:yaocong.duan@gmail.com" target="_blank" class="">yaocong.duan@gmail.com</a>></span> wrote:<br class="">
</div>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">
<div class="h5">
<div dir="ltr" class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
<span style="font-size:11pt" class="">Hi All,<span class=""></span></span></div>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="font-size:11pt" class=""><span class=""> </span></span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
<span style="font-size:11pt" class="">I am using Phase Locking Value to measure the connectivity between brain regions at the source level. I learned that the PLV is an average value over trails. In the fieldtrip code, I calculated a frequency model first,
 then do connectivity analysis with this freq model. The problem is I don’t see trails information in the freq model. So how do I get that phase locking result?<span class=""></span></span></div>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<span style="font-size:11pt" class=""><span class=""> </span></span></p>
<div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
<span style="font-size:11pt" class="">Below is my code. This code works, but I am confused about the question above.</span></div>
<br class="">
<div class=""><span id="cid:ii_161526bd3b49d7bb"><image.png></span><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Thanks in advance,</div>
<div class="">Yaocong</div>
</div>
<br class="">
</div>
</div>
______________________________<wbr class="">_________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/<wbr class="">mailman/listinfo/fieldtrip</a><br class="">
</blockquote>
</div>
<br class="">
</div>
<br class="">
______________________________<wbr class="">_________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/<wbr class="">mailman/listinfo/fieldtrip</a><br class="">
</blockquote>
</div>
<br class="">
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div>
</blockquote>
</div>
<br class="">
</div>
<br class="">
<br class="">
</body>
</html>