<html><head><base href="x-msg://10/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Ingmar,<div><br></div><div>it is definitively possible to cut your long (15 s) trials into smaller segments (i.e. 2 s) using ft_redefinetrial.</div><div><br></div><div>The input would look something like this, in case you haven't tried this:</div><div><br></div><div>for t = 1:length(in.trials) % loop over trials</div><div><br></div><div>   cfg=[];</div><div>   cfg.trials = t; % only take on trial at a time</div><div>   cfg.length = 2; % length of the new trials</div><div>   cfg.overlap = .5 % How much of trial n should overlap with trial n+1</div><div><br></div><div>   out{t} = ft_redefinetrial(cfg,in); % This gives you an output of your 90 trials, cut into smaller "sub trials"</div><div>end</div><div><br></div><div>This way, you could actually compute the coherence of each of your 90 long trials separately.</div><div>However, I'm not sure if this is correct at all or not oversampling your data. If anyone objects, please correct me!</div><div><br></div><div>Best,</div><div><br></div><div>Julian</div><div><br><div><div>Am 07.02.2014 um 00:51 schrieb Vries, I.E.J. de:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div fpstyle="1" ocsi="0" style="word-wrap: break-word; "><div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt; ">Hi Julian,<div><br></div><div>Thanks for the reply. Yes I understand coherence of 1 time series is not possible, but I figured if you have a long enough trial and separate this in enough time windows, you could calculate the average coherence (so not time-resolved) over the whole trial. Anyway I have 10 trials per condition so I'll never calculate the coherence for a single trial.  </div><div><br></div><div>cheers,</div><div>Ingmar<br><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><hr tabindex="-1"><div id="divRpF816479" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a><span class="Apple-converted-space"> </span>[<a href="mailto:fieldtrip-bounces@science.ru.nl">fieldtrip-bounces@science.ru.nl</a>] on behalf of Julian Keil [<a href="mailto:julian.keil@gmail.com">julian.keil@gmail.com</a>]<br><b>Sent:</b><span class="Apple-converted-space"> </span>05 February 2014 14:02<br><b>To:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] corticomuscular and intermuscular coherence<br></font><br></div><div></div><div>Dear Ingmar,<div><br></div><div>I'm not too sure about how exactly coherence is calculated, but be aware that it is not possible to compute single trial coherence. This has been discussed numerous times on this list.</div><div><br></div><div>In case you absolutely need a single-trial analysis of connectivity, you might want to look up my recent paper:</div><div><br></div><div>Keil, J., Müller, N., Hartmann, T., & Weisz, N. (2013). Prestimulus Beta Power and Phase Synchrony Influence the Sound-Induced Flash Illusion. Cerebral Cortex (New York, NY : 1991), 1–11. doi:10.1093/cercor/bhs409</div><div><br></div><div>In this paper, I describe how to use the difference between the phases of two signals compared to the mean phase difference can give an indication of single trial functional connectivity.</div><div><br></div><div>Best,</div><div><br></div><div>Julian</div><div><br><div><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div><div style="word-wrap: break-word; font-size: 12px; ">********************</div><div style="word-wrap: break-word; "><b>Dr. Julian Keil</b></div><div style="word-wrap: break-word; "><b><br></b></div>AG Multisensorische Integration<br>Psychiatrische Universitätsklinik<br>der Charité im St. Hedwig-Krankenhaus<br>Große Hamburger Straße 5-11, Raum E 307<br>10115 Berlin</div><div><br>Telefon: +49-30-2311-1879<br>Fax:        +49-30-2311-2209 </div><div><a href="http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration" target="_blank">http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration</a></div></span></div><br><div><div>Am 05.02.2014 um 13:38 schrieb Vries, I.E.J. de:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div><div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt; ">p.s.<div><br></div><div>And if this is indeed the case, is there a way to change these settings, e.g. calculate the coherence for each trial separately?</div><div><br></div><div>Greetings</div><div><br></div><div><div style="font-family: 'Times New Roman'; color: rgb(0, 0, 0); font-size: 16px; "><hr tabindex="-1"><div id="divRpF258965" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b><span class="Apple-converted-space"> </span>Vries, I.E.J. de<br><b>Sent:</b><span class="Apple-converted-space"> </span>05 February 2014 13:29<br><b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>corticomuscular and intermuscular coherence<br></font><br></div><div></div><div><div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt; ">Dear Fieldtrippers,<div><br></div><div>I have a small question. When I run a ft_connectivityanalysis with coherence as method on a data set of 90 trials of each 15 seconds, the command window gives the output text that coherence is averaged over rpt (replicates). Besides that, for each trial of 15 seconds, 149 tapers are used. </div><div>My question, over which parts is the coherence calculated and then averaged. It seems to me now that first the coherence is calculated over all of the 149 * 90 = 13410 epochs, and then averaged over all of these. Is this the order that ft_connectivity analysis applies? I tried to look it up in the code but got a bit lost there with all the variable names etc... </div><div><br></div><div>Thanks in advance,</div><div>Greetings,</div><div>Ingmar</div></div></div></div></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></span></blockquote></div><br></div></div></div></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></span></blockquote></div><br></div></body></html>