<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>