<div dir="ltr"><div><div>Hi Stephen,<br></div>I followed the tutorial in <a href="http://www.fieldtriptoolbox.org/tutorial/salzburg" target="_blank">http://www.fieldtriptoolbox.<wbr>org/tutorial/salzburg</a>, but used 'dics' (see below).  <br></div>I think that in the example below the  sourceavg.<span class="m_8706990425559925294gmail-me1">avg</span>.<span class="m_8706990425559925294gmail-kw2">filter was indeed used and my results look nice.<br></span><div><br></div><div>Elena<br></div><div><pre class="m_8706990425559925294gmail-code m_8706990425559925294gmail-matlab"><span class="m_8706990425559925294gmail-mark">cfg</span>=<span class="m_8706990425559925294gmail-br0">[</span><span class="m_8706990425559925294gmail-br0">]</span>;
<span class="m_8706990425559925294gmail-mark">cfg</span>.<span class="m_8706990425559925294gmail-me1">method</span>=<span class="m_8706990425559925294gmail-co2">'lcmv'</span>;
<span class="m_8706990425559925294gmail-mark">cfg</span>.<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" target="_blank"><span class="m_8706990425559925294gmail-kw2">grid</span></a>=<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" target="_blank"><span class="m_8706990425559925294gmail-kw2">grid</span></a>;
<span class="m_8706990425559925294gmail-mark">cfg</span>.<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/grid.html" target="_blank"><span class="m_8706990425559925294gmail-kw2">grid</span></a>.<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/filter.html" target="_blank"><span class="m_8706990425559925294gmail-kw2">filter</span></a>=sourceavg.<span class="m_8706990425559925294gmail-me1">avg</span>.<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/filter.html" target="_blank"><span class="m_8706990425559925294gmail-kw2"><wbr>filter</span></a>;
<span class="m_8706990425559925294gmail-mark">cfg</span>.<span class="m_8706990425559925294gmail-me1"><span class="m_8706990425559925294gmail-mark">rawtrial</span></span> = <span class="m_8706990425559925294gmail-co2">'yes'</span>;
<span class="m_8706990425559925294gmail-mark">cfg</span>.<span class="m_8706990425559925294gmail-me1">vol</span>=hdm;
sourcepreS1=ft_sourceanalysis<span class="m_8706990425559925294gmail-br0">(</span><span class="m_8706990425559925294gmail-mark"><wbr>cfg</span>, avgpre<span class="m_8706990425559925294gmail-br0">)</span>;
sourcepstS1=ft_sourceanalysis<span class="m_8706990425559925294gmail-br0">(</span><span class="m_8706990425559925294gmail-mark"><wbr>cfg</span>, avgpst<span class="m_8706990425559925294gmail-br0">)</span>;</pre><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 July 2017 at 18:03, Stephen Whitmarsh <span dir="ltr"><<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Elena!<br><br></div>Thanks! But I do wonder.. did you check whether the common filter (specified in the cfg) was used or whether a filter was calculated for each trial separately (which does not make sense in my case)?<br><br></div>Best,<br></div>Stephen<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 6 July 2017 at 16:57, Elena Orekhova <span dir="ltr"><<a href="mailto:orekhova.elena.v@gmail.com" target="_blank">orekhova.elena.v@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Just recently had the same problem. <br></div>It worked with  cfg.rawtrial='yes'.<br><br></div>Best,<br></div>Elena<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_5194166427672348947h5">On 4 July 2017 at 18:03, Stephen Whitmarsh <span dir="ltr"><<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_5194166427672348947h5">



<div>
<div dir="ltr">
<div>
<div>
<div>Hi everyone,<br>
<br>
<span style="font-family:arial,helvetica,sans-serif">I am now trying to use the DICS method for sourceanalysis, with 'powandcsd' output from ft_freqanalysis as its input and using a precomputed filter and leadfield. However, I would like to keep my separate
 trial estimates in the final source analysis, and while the documentation suggests I should be able to get that with cfg.keeptrials, but this doesn't have the expected effect.<br>
<br>
</span></div>
<span style="font-family:arial,helvetica,sans-serif">I previously made workaround using PCC on fourier data instead (see below), I think to deal with this issue. I was wondering if this is still the recommended option, i.e. workaround? Alternatively, and perhaps
 preferably, would someone have a suggestion for a solution consistent with the DICS implementation?</span><br>
<br>
</div>
Thanks for your time,<br>
</div>
Stephen<br>
<div>
<div><span style="font-family:monospace,monospace"><br>
</span></div>
<div><span style="font-family:monospace,monospace">% source analysis<br>
</span></div>
<div><span style="font-family:monospace,monospace">cfg.method           = 'pcc';<br>
...<br>
cfg.keeptrials       = 'yes';<br>
cfg.pcc.keepmom      = 'yes';<br>
cfg.pcc.fixedori     = 'no';<br>
source_control       = ft_sourceanalysis(cfg, FFT);   <br>
<br>
and then:<br>
<br>
% project moment and tapers<br>
cfg = [];<br>
cfg.projectmom = 'no';<br>
cfg.keeptrials = 'yes';<br>
cfg.powmethod  = 'lambda1';<br>
source         = ft_sourcedescriptives(cfg,sour<wbr>ce);<br>
</span><br>
<br>
</div>
</div>
</div>
</div>

<br></div></div><span>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/<wbr>mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>