<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear community,</div><div dir="ltr"><div>We also have problemns using <span style="color:rgb(32,33,36);font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:1.375rem;font-variant-ligatures:no-contextual"> </span><i><span style="color:rgb(32,33,36);font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-variant-ligatures:no-contextual">ft_connectivityanaly</span><span style="color:rgb(32,33,36);font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-variant-ligatures:no-contextual">sis. </span></i></div><div><i><span style="color:rgb(32,33,36);font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-variant-ligatures:no-contextual"><br></span></i></div><div><span style="color:rgb(32,33,36);font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-variant-ligatures:no-contextual">In our code, the sourceanalysis have been performed using eloreta method.</span></div><div><span style="color:rgb(32,33,36);font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-variant-ligatures:no-contextual"><br></span></div><div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg = [];</span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.method = 'eloreta'; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.grid = leadfield; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.projectnoise = 'yes'; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.keepfilter = 'yes'; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.headmodel = vol; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.channel = 'all';</span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.senstype = 'eeg';</span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.datatype = 'freq'; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.grid.xgrid = [-90 : 5 : 90]; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.grid.ygrid = [-115: 5 : 85];</span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> cfg.grid.zgrid = [-70 : 5 : 100]; </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><br></span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"> source = ft_sourceanalysis(cfg, data_Fourier);</span></font></div></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><br></span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual">When implementing the connectivity analysis function we obtain errors due to the fact that 'mom' is too big, since we are considering all electrodes location instead of ROI`s. </span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><br></span></font></div><div><span style="color:rgb(32,33,36);font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-variant-ligatures:no-contextual">We have seen that connectivity also can be done using frequency data instead source, like this we do not have erros but we do not understand the theorical differences.</span> <font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><br></span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><br></span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><div> cfg = [];</div><div> cfg.output = 'fourier';</div><div> cfg.channel = 'all'; </div><div> cfg.method = 'mtmfft'; </div><div> cfg.taper = 'hanning'; </div><div> cfg.foilim = [8 12];</div><div> cfg.feedback = 'no';</div><div><br></div><div> data_Fourier = ft_freqanalysis(cfg, data); </div><div><br></div><div> <span style="color:rgb(38,50,56);font-family:Roboto,sans-serif;font-size:13px;font-variant-ligatures:normal">cfg = [];</span></div></span></font><span style="color:rgb(38,50,56);font-family:Roboto,sans-serif;font-size:13px"> cfg.method ='coh';</span><br style="color:rgb(38,50,56);font-family:Roboto,sans-serif;font-size:13px"><span style="color:rgb(38,50,56);font-family:Roboto,sans-serif;font-size:13px"> cfg.complex = 'absimag';</span><br style="color:rgb(38,50,56);font-family:Roboto,sans-serif;font-size:13px"><span style="color:rgb(38,50,56);font-family:Roboto,sans-serif;font-size:13px"> source_conn = ft_connectivityanalysis(cfg, data_Fourier);</span></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><br></span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual"><br></span></font></div><div><font color="#202124" face="Google Sans, Roboto, RobotoDraft, Helvetica, Arial, sans-serif"><span style="font-variant-ligatures:no-contextual">Could someone help us with this issue? </span></font></div><div><br></div><div>Thank to all.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Hau idatzi du Davide Sometti (<a href="mailto:davide.sometti-1@studenti.unitn.it">davide.sometti-1@studenti.unitn.it</a>) erabiltzaileak (2019 mai. 15, az. (12:28)):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks a lot for the answers.<div><br></div><div>Best,<br clear="all"><div><div dir="ltr" class="gmail-m_8835338994776474354gmail_signature"><div dir="ltr">Davide S.</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 15 mag 2019 alle ore 11:56 Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi all,
<div><br>
</div>
<div>Allow me to correct Eelke’s statement a bit: <i>in the context of what Davide wants to do</i> ft_connectivityanalysis requires single trial input. This is not true in general. </div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br>
<div>
<blockquote type="cite">
<div>On 15 May 2019, at 10:49, Eelke Spaak <<a href="mailto:e.spaak@donders.ru.nl" target="_blank">e.spaak@donders.ru.nl</a>> wrote:</div>
<br class="gmail-m_8835338994776474354gmail-m_2094535337031268880Apple-interchange-newline">
<div>
<div>Dear Davide,<br>
<br>
ft_connectivityanalysis requires individual trials, and the<br>
combination of 'fourier' - 'pcc' is the only combination there that<br>
results in individual trial estimates. Internally, I think the 'pcc'<br>
beamformer basically computes the exact same filters as DICS, it just<br>
has a somewhat different (i.e. more flexible) approach to data<br>
bookkeeping, allowing straightforward filtering of individual trials.<br>
<br>
Best,<br>
Eelke<br>
<br>
On Tue, 14 May 2019 at 15:27, Davide Sometti<br>
<<a href="mailto:davide.sometti-1@studenti.unitn.it" target="_blank">davide.sometti-1@studenti.unitn.it</a>> wrote:<br>
<blockquote type="cite"><br>
Dear community,<br>
<br>
I’m trying to perform connectivity analysis (Matlab 2018b, FieldTrip 2018-12-11), in order to obtain the absolute part of the imaginary coherence. Here are the steps that I’ve used in order to perform it.<br>
<br>
1- First I performed the frequency analysis, on the single condition (not showed), and on all the conditions together<br>
<br>
cfg = [];<br>
<br>
cfg.channel = chn;<br>
<br>
cfg.method = 'mtmfft';<br>
<br>
cfg.output = 'powandcsd';<br>
<br>
cfg.taper = 'dpss';<br>
<br>
cfg.keeptrials ='no';<br>
<br>
cfg.keeptapers ='no';<br>
<br>
cfg.tapsmofrq = 3;<br>
<br>
cfg.foi = [6; 11; 16; 21; 26; 40];<br>
<br>
data_freq_all = ft_freqanalysis(cfg, data_reject_all);<br>
<br>
<br>
<br>
2- I computed the beamformer filters based on the entire data<br>
<br>
cfg=[];<br>
<br>
cfg.method='dics';<br>
<br>
cfg.frequency=6;<br>
<br>
cfg.grid=lf;<br>
<br>
cfg.grid.pos=pos;<br>
<br>
cfg.grid.tri=tri;<br>
<br>
cfg.headmodel=hdm;<br>
<br>
cfg.senstype = 'meg';<br>
<br>
cfg.dics.projectnoise = 'yes';<br>
<br>
cfg.dics.lambda = '5%';<br>
<br>
cfg.dics.keepfilter = 'yes';<br>
<br>
cfg.dics.realfilter = 'yes';<br>
<br>
cfg.dics.keepcsd = 'yes';<br>
<br>
cfg.dics.keepmom = 'yes';<br>
<br>
cfg.dics.fixedori = 'yes';<br>
<br>
sourceAll = ft_sourceanalysis(cfg,data_all);<br>
<br>
<br>
<br>
3- I've then performed the source analysis on each of the four conditions, using the precomputed filter<br>
<br>
cfg.grid.filter=sourceAll.avg.filter;<br>
<br>
<br>
<br>
source_pre_incl=ft_sourceanalysis(cfg,data_pre_incl);<br>
<br>
source_pre_excl=ft_sourceanalysis(cfg,data_pre_excl);<br>
<br>
source_post_incl=ft_sourceanalysis(cfg,data_post_incl);<br>
<br>
source_post_excl=ft_sourceanalysis(cfg,data_post_excl);<br>
<br>
<br>
<br>
4- Finally I’ve performed the connectivity analysis<br>
<br>
<br>
<br>
<br>
<br>
cfg=[];<br>
<br>
cfg.method ='coh';<br>
<br>
cfg.complex = 'absimag';<br>
<br>
source_conn = ft_connectivityanalysis(cfg, source_pre_incl);<br>
<br>
<br>
<br>
When I try to run the connectivity analysis I get this error, and I cannot go further in the analysis.<br>
<br>
<br>
<br>
Reference to non-existent field 'mom'.<br>
<br>
<br>
<br>
Error in univariate2bivariate (line 225)<br>
<br>
sizmom = size(data.mom{data.inside(1)});<br>
<br>
<br>
<br>
Error in ft_connectivityanalysis (line 449)<br>
<br>
[data, powindx, hasrpt] = univariate2bivariate(data, 'mom', 'crsspctrm', dtype, 'cmb', cfg.refindx, 'keeprpt', 0);<br>
<br>
<br>
<br>
<br>
<br>
I’ve tried different solution, changing output for the frequency analysis and method for the beamforming, like follow:<br>
<br>
<br>
<br>
'fourier' - 'pcc'<br>
<br>
'powandcsd' - 'pcc'<br>
<br>
'fourier' - 'dics'<br>
<br>
The combination fourier and pcc was the only one that worked, among the 4, the others always gave me the same error, as above. I’m wondering why even if I’ve specified cfg.keepmom=’yes’, this one is not present in the structure after the source analysis.<br>
<br>
Anyone that could help me?<br>
<br>
Davide S.<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>