<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Dear Patrick,<div class=""><br class=""></div><div class="">As you have already noticed the answer to your question is because you do the different things. I assume that what you did in the wavelet case was the following: you performed tf-decomposition on the epochs (correct and incorrect), applied a baseline correction and contrasted the baselined data. After subtraction of the two baselined conditions you found your effect in beta. If this is correct, in order to reproduce the same approach in source space I suggest you do the following.</div><div class=""><br class=""></div><div class="">1. Within each condition select the data into pre and post intervals of interest. For example, say your effect is in the latency from .5 to 1 sec after stimulus onset. Select for each condition a pre period (-1 to -.5) and post period (.5 to 1sec).</div><div class="">2. Append all the data using ft_appenddata and call ft_sourceanalysis as you did so far but with cfg.dics.keepfilter = ‘yes’;</div><div class="">3. Make 4 additional calls to ft_sourceanalysis for the pre and post intervals of the 2 conditions. Key here is to pass on the filters computed in the 2nd step by specifying cfg.sourcemodel.filter = outputfrom2ndstep.filter;</div><div class="">Why and how you should do this is further explained here <a href="https://www.fieldtriptoolbox.org/example/common_filters_in_beamforming/" class="">https://www.fieldtriptoolbox.org/example/common_filters_in_beamforming/</a></div><div class="">4. Make a contrast baseline vs. Poststim activity per condition. This way you end up with two source maps, one for correct and one for incorrect. Use ft_math to compute a difference score and plot the result. </div><div class="">The left-right flip has to do with the coordinates of the MR you are using. One easy fix is to follow the steps in the beamforming tutorial, i.e. ft_volumenormalise.</div><div class=""><br class=""></div><div class="">Good luck,</div><div class="">Tzvetan</div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 13 Nov 2020, at 11:20, Patrick Wiegel <<a href="mailto:patrick.wiegel@sport.uni-freiburg.de" class="">patrick.wiegel@sport.uni-freiburg.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class="">

<div class="">
<div class="" style="word-wrap:break-word; line-break:after-white-space">Dear Field-trip community,
<div class=""><br class="">
</div>
<div class="">I am working on EEG data from a motor learning task. in the first part of my analysis, I performed a time-frequency analysis (Morlet wavelet method) and cluster-based permutation test. I compared two different conditions (correct & incorrect movements)
 within subjects and found a significant difference in the beta band (20-35 Hz) when subjects were provided with feedback. I attached the topographical plot from one subject that illustrates the difference between the conditions at the selected time point and
 frequency (dif_morlet). As you can see, beta power was higher in one condition in lateral frontal electrodes.</div>
<div class=""><br class="">
</div>
<div class="">Now, I would like to better spatially locate the effect for this single subject. For this purpose, I followed the Beamformer tutorial on the website. In the first step, I selected the raw data of interest (at the time where the effect was seen)
 and performed frequency analyses for the 20-35 Hz range (mtmfft, contrast between conditions shown in dif_mtmfft). There is an apparent difference between dif_morlet and dif_mtmfft and I am wondering why this is the case? One apparent reason is that the time-frequency
 data were baseline corrected and the frequency data from mtmfft not.</div>
<div class=""><br class="">
</div>
<div class="">Using the power and CSD data from mtmfft, I performed the source analysis with a standard MRI and head model. The source was located in the left hemisphere (source plot), which is in stark contrast to the time-frequency data (dif_morlet). I am
 aware that the source analysis is based on a lot of assumptions (conductivity etc.) that influence the calculations but it is very difficult to make sense of such discrepancy. </div>
<div class="">Maybe it is necessary to also baseline correct the mtmfft data before inputting them to the source analysis? Or doing the contrasting source localization betwee a single condition and the corresponding baseline data before contrasting the 2 conditions? </div>
<div class=""><br class="">
</div>
<div class="">I am providing all necessary files and scripts (TF_analysis & BEAMFORMER) if anyone is interested to reproduce the results that I am showing and reporting for this single subject (<a href="https://github.com/PatrickWiegel/EEG-Beamformer-Source-localisation" class="">https://github.com/PatrickWiegel/EEG-Beamformer-Source-localisation</a>). </div>
<div class=""><br class="">
</div>
<div class="">I would appreciate any help and discussion on that.</div>
<div class=""><br class="">
</div>
<div class="">All the best,</div>
<div class="">Patrick</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
<div style="word-wrap:break-word; line-break:after-white-space" class="">
<div class=""></div>
</div>
<div style="word-wrap:break-word; line-break:after-white-space" class="">
<div class=""></div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<div class=""></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class="">
<div class="" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word; line-break: after-white-space;">
<b class="">Patrick Wiegel</b><br class="">
<font color="#680823" class="">Department of Sport and Sport Science</font>
<div class=""><br class="">
University of Freiburg <br class="">
Sandfangweg 4<br class="">
79117 Freiburg i. Br . <br class="">
<br class="">
<div class="">phone: +49 (0)761/ 203-4550<br class="">
<a href="mailto:patrick.wiegel@sport.uni-freiburg.de" class="">email: patrick.wiegel@sport.uni-freiburg.de</a><br class="">
web: <a href="http://www.sport.uni-freiburg.de" class="">www.sport.uni-freiburg.de</a></div>
</div>
</div>
</div>
<br class="">
</div>
</div>
</div>

<span id="cid:C753BE4C5BC18441A7CADB79486EC79C@local"><dif_morlet.eps></span><span id="cid:D57ED7D32CCB0D45991FFAD44B406413@local"><dif_mtmfft.eps></span><span id="cid:B79C31B3177DCE40B09317257507F81F@local"><sourceplot.eps></span>_______________________________________________<br class="">fieldtrip mailing list<br class=""><a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">https://doi.org/10.1371/journal.pcbi.1002202<br class=""></div></blockquote></div><br class=""></div></body></html>