<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">Hi Xie,<br>
are you sure your output does not contain trial data? <br>
<br>
If you look in source.avg.mom you should see a cell array containing for
each inside source point another cell array with as many entries as
there are trials (I know it is confusing because you expect .avg to
contain averages, but it may not). The field .csd (cross-spectral
density) should contain only one (complex-valued) entry per source point
since it is averaged across trials (or calculated on the average over
all trials, not sure right now).<br>
<span>
</span><br>
By the way: In case you get errors in downstream functions with your
current output (e.g. when using ft_sourcegrandaverage) check the
bugzilla on PCC output containing the spatial filter (e.g.
<a class="moz-txt-link-freetext" href="http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2861">http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=2861</a> or 3184). <br>
If you don't really need the filter you can use cfg.keepfilter = 'no' on
ft_sourceanalysis or remove the filter and filterdimord fields when
calling functions that would otherwise fail.<br>
<br>
Best,<br>
Jens<br>
<blockquote style="border: 0px none;"
cite="mid:CAA6G0Y9-Zz+jGeBsXn2ckmkpcOLnhqf9qakRTZVr3XV78EvJnw@mail.gmail.com"
type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="width:100%;border-top:2px solid #EDF1F4;padding-top:10px;"> <div
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
<a moz-do-not-send="true" href="mailto:xiew1202@gmail.com"
style="color:#485664
!important;padding-right:6px;font-weight:500;text-decoration:none
!important;">Xie Wanze</a></div> <div
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
right;"> <font color="#909AA4"><span style="padding-left:6px">Samstag,
31. Dezember 2016 15:09</span></font></div> </div></div>
<div style="color:#909AA4;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div dir="ltr">Dear Fieldtrip
community, <div>I have a question about using the "keeptrials" option
when do the source analysis with the beamformer ('PCC') method. The
issue I met was that the cfg.keeptrials = 'yes' did not work, i.e., the
calculation was not done for all the trials but generated averaged
output. </div><div> Has anyone met this issue before? And does anyone
know how to fix it?</div><div> It did not work for my data nor for the
data I downloaded from the FT database. I attached the codes that I
copied from the FT website using the FT's example data. </div><div> I
would like to keep the trials information in the source analysis because
I plan to do the source space connectivity analysis later, which needs
the individual trials information. Or maybe the "crsspctrm" matrix.</div><div><br></div><div>Codes:</div><div><br></div><div> <span
style="background-color:rgb(247,249,250);font-family:"andale
mono";font-size:12px;text-align:justify">cfg </span><span
style="background-color:rgb(247,249,250);font-family:"andale
mono";font-size:12px;text-align:justify"> </span><span
style="background-color:rgb(247,249,250);font-family:"andale
mono";font-size:12px;text-align:justify">= [];</span></div>
<p class="gmail-p1"><span class="gmail-s1">cfg.frequency =
freq.freq;</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.method =
'pcc';</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.grid = lf;</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.headmodel = hdm;</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.keeptrials =
'yes';</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.pcc.lambda =
'10%';</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.pcc.projectnoise =
'yes';</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.pcc.keepfilter =
'yes';</span></p>
<p class="gmail-p1"><span class="gmail-s1">cfg.pcc.fixedori =
'yes';</span></p>
<p class="gmail-p1"><span class="gmail-s1">source =
ft_sourceanalysis(cfg, freq);</span></p><p class="gmail-p1"><br></p><p
class="gmail-p1">Output ("source"):</p><p class="gmail-p1"> freq: 10</p><p
class="gmail-p1"> cumtapcnt: [268x1 double]</p><p class="gmail-p1">
tri: [16000x3 double]</p><p class="gmail-p1"> inside:
[8004x1 logical]</p><p class="gmail-p1"> pos: [8004x3 double]</p><p
class="gmail-p1"> method: 'average'</p><p class="gmail-p1">
avg: [1x1 struct]</p><p class="gmail-p1"> cfg: [1x1 struct] </p><div> </div></div>
<div>_______________________________________________<br>fieldtrip
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a class="moz-txt-link-freetext" href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></div>
</blockquote>
<br>
</body></html>