<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="">
Hi Alex,
<div class=""><br class="">
</div>
<div class="">Well, it’s hard to make any educated guesses, but given the high values of the coherence at sensor level, it’s surprising to see the discrepancy with the source results.</div>
<div class=""><br class="">
</div>
<div class="">I would:</div>
<div class="">-crank up the lambda big time (e.g. to 100%)</div>
<div class="">-play around with the fixedori option</div>
<div class="">-increase the spatial sampling of the grid (perhaps you are undersampling and miss a very focal maximum in the tremor condition).</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">JM</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 19 Dec 2023, at 20:37, Alexandra <<a href="mailto:alexandra.steina@hhu.de" class="">alexandra.steina@hhu.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="cellpadding:0;border:0;cellspacing:0;display:table;width:100%;table-layout:fixed;border-collapse:seperate;float:none;" align="left" class="">
<tbody style="display:block;" class="">
<tr class="">
<td valign="middle" width="1px" bgcolor="#A6A6A6" cellpadding="7px 2px 7px 2px" style="padding:7px 2px 7px 2px;background-color:#A6A6A6;valign:middle" class="">
</td>
<td valign="middle" width="100%" bgcolor="#EAEAEA" cellpadding="7px 5px 7px 15px" style="width:100%;background-color:#EAEAEA;padding:7px 5px 7px 15px;font-family:wf_segoe-ui_normal,Segoe UI,Segoe WP,Tahoma,Arial, sans-serif;font-size:12px;font-weight:normal;color:#212121;text-align:left;word-wrap:break-word;" class="">
<div class="">You don't often get email from <a href="mailto:alexandra.steina@hhu.de" class="">
alexandra.steina@hhu.de</a>. <a href="https://aka.ms/LearnAboutSenderIdentification" class="">
Learn why this is important</a></div>
</td>
<td valign="middle" align="left" width="75px" bgcolor="#EAEAEA" cellpadding="7px 5px 7px 5px" style="width:75px;background-color:#EAEAEA;padding:7px 5px 7px 5px;font-family:wf_segoe-ui_normal,Segoe UI,Segoe WP,Tahoma,Arial, sans-serif;font-size:12px;font-weight:normal;color:#212121;text-align:left;word-wrap:break-word;align:left" class="">
</td>
</tr>
</tbody>
</table>
<div class="">
<div dir="auto" class="">
<div dir="auto" class="">
<div class="">Hi Jan-Mathijs, </div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class="">thanks for the quick response!</div>
<div dir="auto" class="">The data is not a combination of mag/grad, there are only grad included. Also I have not applied maxfilter. We are aware of the problem of rank-deficiency and use it always only with caution. </div>
<div dir="auto" class="">I've tried different values for lambda already, but haven't really seen an improvement (I should maybe take a closer look at lambda again.)</div>
<div class="">I've discussed this issue also with others in the lab, but we couldn't figure out what's going on. </div>
<div dir="auto" class="">Do you have further ideas what I could try now that you know more about the data?<br class="">
</div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class="">Best and thank for your help, </div>
<div dir="auto" class="">Alex</div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class=""><br class="">
</div>
<div data-smartmail="gmail_signature" class="">Sent from Android device</div>
</div>
<div class=""><br class="">
<div class="elided-text">On Dec 19, 2023 17:58, "Schoffelen, J.M. (Jan Mathijs) via fieldtrip" <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:<br type="attribution" class="">
<blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex" class="">
<div style="word-wrap:break-word" class="">Dear Alex,
<div class=""><br class="">
</div>
<div class="">Uhm, it’s difficult to comment why your script would work on the beta band data, and not on the theta band data (where the value of coherence seem to be much higher).</div>
<div class=""><br class="">
</div>
<div class="">Actually,m I am a bit surprised that the script you copied into the e-mail works more or less well for the beta band coherence. (Oh and before I forget, there’s a small typo cfg.dics.reafilter should read cfg.dics.realfilter, but that’s probably
 not going to solve it).</div>
<div class=""><br class="">
</div>
<div class="">The reason of my surprise, is that beamforming on Elekta data typically does not work really well if you just use some mild ‘lambda’ regularisation, specifically if you use maxfiltered data and/or combine magnetometers and gradiometers. Maxfiltered
 data is highly rank deficient, which typically requires a slightly different heurstic for regularisation, and combined mag/grad data should be handled with a little bit of care, given that the respective signals are on a very different scale. How to best deal
 with these issues is for instance described here: <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpubmed.ncbi.nlm.nih.gov%2F34890794%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C0f52ee73f3704611b82108dc012f4b92%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638386549846044134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=H%2BipPzBMUpQ11PCYdC%2FAb2ptdlEvEnKWl1MAoBrzyEs%3D&reserved=0" originalsrc="https://pubmed.ncbi.nlm.nih.gov/34890794/" shash="LV8Kkhc2w9tnPFplmdYSiTP+B5pevTKLNLTXyg1gwwbZtka08R15Xu5Pvsl8XCChTbcu3Pt1LeklV7dap0k02UA0AKZz6pphayPUaqB/9mQxJ3Ta6yeR5P3/MgxqVePNMtexIl3fIVwYH4dwVCj9VKOeatRHLMmOBUBVeBDexnU=" originalsrc="https://pubmed.ncbi.nlm.nih.gov/34890794/" shash="fucQYekTehJ04MYQjVCxYd4waBnOzYUTR8VlpfX6S4e2MO8ivDLDVH0c7XbyCOT0+FrFQ6L20QYtb57hSisWxLnKhYZEIi8Bk6MOFFpqkeZ9UIqaKaPjQal2PH7RzplKnERAq2fLo9W0l8cfdJ8X58m1J3Uj6UQdcNSO51l9gLs=" class="">https://pubmed.ncbi.nlm.nih.gov/34890794/</a>.
 Some hands-on info is given here: <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fieldtriptoolbox.org%2Fworkshop%2Fparis2019%2Fhandson_sourceanalysis%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C0f52ee73f3704611b82108dc012f4b92%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638386549846044134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MW6eD8RcCwFij8VhS%2Bd7sK%2FHNw%2F74FT5nKOKjnZ23rk%3D&reserved=0" originalsrc="https://www.fieldtriptoolbox.org/workshop/paris2019/handson_sourceanalysis/" shash="fMP/qYcMcOeFlnteRudDtf9BfmlhbZiPlZSy+Bf5wN8KPMzuvLjCHfJE1fz+pYI4/XL0SdOKBm1D6IUiLJmMaxbpFbBY7dF9sV+jDlAbyB8Hk6KqdV4/yK5ITeimIjRbjzC6KzK7MYtRFkGG/NDMNFIK3PaiI7hDWBKt+OTz090=" originalsrc="https://www.fieldtriptoolbox.org/workshop/paris2019/handson_sourceanalysis/" shash="OxVHPEFfN9PWjpxMqc16a3bEh2GGN7pZ/BQnoW0Efmdv+xhP90XIBkKo42Ny93yDO0Oj4wXbPXmrmLsKM6R7it+6WwTxtFKpktfaC80wDAcNHBXaYK2HuiQTQMEM7w/ubm3S4/3e5hEsmHSkx9Cc916u+W06RVmUf6h5ImDxZ28=" class="">https://www.fieldtriptoolbox.org/workshop/paris2019/handson_sourceanalysis/</a> (just
 forget about the fact that in the tutorial example we used ‘lcmv’, and a cortical sheet constrained sourcemodel, that shouldn’t matter overall).</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote class="">
<div class="">On 18 Dec 2023, at 20:22, Alexandra Kathrin Steina via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="">
<div class="">
<div class="">Dear Fieldtrip community,<br class="">
<br class="">
I am working with MEG and LFP data from patients with Parkinson’s disease/essential tremor.<br class="">
I want to compare how coherence between DBS-targets and cortex changes between tremor and tremor-free epochs at tremor frequency.<br class="">
For this, I’ve calculated coherence between LFPs and MEG and used a dics-beamformer to localize coherent sources.<br class="">
I have encountered something that I find weird/confusing when localizing the tremor-coherence peaks (LFP-MEG coherence at tremor frequency) of most of the subjects.<br class="">
I've uploaded images of one example on WeTransfer under the following link: <a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwe.tl%2Ft-B6dw2hF4aT&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C0f52ee73f3704611b82108dc012f4b92%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638386549846044134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=AX9gkLiF3vUjbgHWwhLIkh0AIhcSFeaD8w9srHfzchg%3D&reserved=0" originalsrc="https://we.tl/t-B6dw2hF4aT" shash="jbW7NHm745cgcONOr/0aiFtJHlPeUi3qpmVrWDMmPgrS6k3bTPOq1bQwF6ZF1oytyWrCamlspwPGOainUM1koTi5FrMWRPFY6xbKGplAh+3m5AQHRXIMiwIznkZtOJlrsv2hGALZNWZDJJ9cphv4f5MhnBnVA+251BvSCo9sTDg=" originalsrc="https://we.tl/t-B6dw2hF4aT" shash="vNLjimnip8wZUcsv3EMb0As1LwffDI94Ht3BqRd3m7RAddzvj42DKjazJUXTEr65FXZ28cAza4b6jY39rfsGPHsjys15MgzWP7mkdCdOp5WMaxXhngk0jihGWOLUcH2OmeiC0BikJ2BzRa7JRSD2yl2K+ORHOcMOrmJWZvgaqkw=" class="">
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwe.tl%2Ft-B6dw2hF4aT&data=05%7C02%7Cjanmathijs.schoffelen%40donders.ru.nl%7C6118e6fdd6f34d13d4f408dc000261fe%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638385257435950519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tSnUMDidX42D04I5Lez55pbkGJZei1CeS1R6kYcMXhs%3D&reserved=0</a>
 On sensor-level there is a clear peak visible at tremor frequency which is absent during no-tremor (figure 1). From what I see on sensor-level I would expect to also see much higher activity on source-level and a clear localization. However, when I apply dics-beamformer
 the maximal coherence value for the tremor-epochs is much lower, than for the tremor-free epochs (figure 2).<br class="">
In addition, the localization seems a bit strange to me, especially when compared with the sensor image.<br class="">
I’ve also applied a common filter, because I thought that it might solve the problem, but it did not.<br class="">
I’ve used the exact same pipeline and exact same script to localize coherence between LFP and MEG at eg. high-beta or alpha frequencies and it gives me “good” results (see image 3, data from a different subject which did not have tremor).<br class="">
I have used ‘fieldtrip-20201214‘ to generate the images, but have also tried fieldtrip versions from 2018 to the most recent one, all yielding similar results.<br class="">
<br class="">
I would be grateful for advice on why this is happening!<br class="">
<br class="">
Best,<br class="">
Alex<br class="">
<br class="">
Code-snippet I've used:<br class="">
<br class="">
   refchannel = 'LFP-right-2B-3B';<br class="">
   freqs = 1:35;<br class="">
<br class="">
   cfg=[];<br class="">
   cfg.method='mtmfft';<br class="">
   cfg.output='powandcsd';<br class="">
   cfg.taper= 'hanning';<br class="">
   cfg.foi = freqs;<br class="">
   cfg.keeptrials = 'no';<br class="">
   pow_csd_tremor =ft_freqanalysis(cfg,data_seg_tremor);<br class="">
   pow_csd_notremor =ft_freqanalysis(cfg,data_seg_notremor);<br class="">
<br class="">
   cfg = [];<br class="">
   cfg.method = 'coh';<br class="">
   coh_tremor = ft_connectivityanalysis(cfg,pow_csd_tremor);<br class="">
   coh_notremor = ft_connectivityanalysis(cfg,pow_csd_notremor);<br class="">
<br class="">
   cfg = [];<br class="">
   cfg.interactive = 'yes';<br class="">
   cfg.parameter = 'cohspctrm';<br class="">
   cfg.refchannel = refchannel;<br class="">
   cfg.layout = 'neuromag306planar.lay';<br class="">
   ft_multiplotER(cfg,coh_tremor,coh_notremor);<br class="">
<br class="">
   %% dics beamformer<br class="">
<br class="">
   common_filter_dics = 1;<br class="">
<br class="">
   for f = 1:length(freqs)<br class="">
<br class="">
       dat_appended = ft_appenddata([],data_seg_tremor,data_seg_notremor);<br class="">
<br class="">
       cfg = [];<br class="">
       cfg.method = 'mtmfft';<br class="">
       cfg.output = 'powandcsd';<br class="">
       cfg.foi = freqs(f);<br class="">
       cfg.taper = 'hanning';<br class="">
       cfg.keeptrials = 'yes';<br class="">
       freq_tremor = ft_freqanalysis(cfg,data_seg_tremor);<br class="">
       freq_notremor = ft_freqanalysis(cfg,data_seg_notremor);<br class="">
       freq_appended = ft_freqanalysis(cfg,dat_appended);<br class="">
<br class="">
       cfg=[];<br class="">
       cfg.method='dics';<br class="">
       cfg.dics.lambda='5%';<br class="">
       cfg.dics.keepcsd = 'yes';<br class="">
       cfg.dics.keepfilter = 'yes';<br class="">
       cfg.dics.reafilter = 'yes';<br class="">
       cfg.frequency = freqs(f);<br class="">
       cfg.channel = 'MEG';<br class="">
       cfg.headmodel=hdm;<br class="">
       cfg.sourcemodel=grid;<br class="">
       cfg.reducerank=2;<br class="">
       cfg.refchan = refchannel;<br class="">
       source_appended_forfilter = ft_sourceanalysis(cfg, freq_appended);<br class="">
<br class="">
<br class="">
       cfg=[];<br class="">
       cfg.method='dics';<br class="">
       cfg.dics.lambda='5%';<br class="">
       cfg.dics.keepcsd = 'yes';<br class="">
       cfg.headmodel=hdm;<br class="">
       cfg.sourcemodel=grid;<br class="">
       cfg.frequency = freqs(f);<br class="">
       cfg.channel = 'MEG';<br class="">
       cfg.reducerank=2;<br class="">
       cfg.refchan = refchannel;<br class="">
       if common_filter_dics == 1<br class="">
           cfg.sourcemodel.filter = source_appended_forfilter.avg.filter;<br class="">
           cfg.sourcemodel.label = source_appended_forfilter.avg.label;<br class="">
       end<br class="">
       source_tremor_dics{f}= ft_sourceanalysis(cfg, freq_tremor);<br class="">
       source_tremor_dics{f}.pos = template_grid.pos;<br class="">
       source_tremor_dics{f}.dim = template_grid.dim;<br class="">
       source_notremor_dics{f}= ft_sourceanalysis(cfg, freq_notremor);<br class="">
       source_notremor_dics{f}.pos = template_grid.pos;<br class="">
       source_notremor_dics{f}.dim = template_grid.dim;<br class="">
<br class="">
   end<br class="">
<br class="">
   %% plot all results<br class="">
<br class="">
   freq_to_plot = 4;<br class="">
<br class="">
   cfg = [];<br class="">
   cfg.parameter = 'coh';<br class="">
   cfg.interpmethod        = 'cubic';<br class="">
   it_tremor_dics = ft_sourceinterpolate(cfg,source_tremor_dics{freq_to_plot},t1);<br class="">
   it_notremor_dics = ft_sourceinterpolate(cfg,source_notremor_dics{freq_to_plot},t1);<br class="">
<br class="">
   cfg =  [];<br class="">
   cfg.method = 'ortho';<br class="">
   cfg.funparameter = 'coh';<br class="">
   cfg.maskparameter = 'coh';<br class="">
   cfg.interactive = 'yes';<br class="">
   figure;<br class="">
   cfg.funcolorlim = [0 max(it_tremor_dics.coh)];<br class="">
   ft_sourceplot(cfg,it_tremor_dics);<br class="">
   cfg.funcolorlim = [0 max(it_notremor_dics.coh)];<br class="">
   ft_sourceplot(cfg,it_notremor_dics);<br class="">
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C0f52ee73f3704611b82108dc012f4b92%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638386549846044134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bB7z%2Ff0f0cEiEY1YqquSah4TI9hRNe2nmXo%2BulJxkAg%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="h83pycVX8S2XEidPfQ7cHZb75L799hex+fIFWVLEQurhIyXV8agED/1y/OhUnJ3VjaCx/EorWSY0fFVJ9RqAhU05G6DeiyfturG41LHiNchWN5E6IVm9ibS4rAsBoxbG88AmjvkYBzoyDjB+NYYTvAiW9dovfINjzVA+v1mlm7I=" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="YfVEjajtFEXD72yXar9RvF0TTHeYLHE9RduSXHroarU5c3KCcSevKCUYaDryEkKNTGf/rbaNYrXUaML3u/jg1CiJyBZBi33+qD6llyqdegh93pII8l6fRQNZUBxlPiAzbrTp5KR7rmVbnCjlBUqJGeQd+VZxcYKWdGBXaoEeyeo=" class="">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cjanmathijs.schoffelen%40donders.ru.nl%7C6118e6fdd6f34d13d4f408dc000261fe%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638385257435950519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6lm5S02fQCvioafyAUM6r1GI1MeILyBhA4EgKmert30%3D&reserved=0</a><br class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C0f52ee73f3704611b82108dc012f4b92%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638386549846044134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WQ%2BmFSbIjJodkX0mnKmb6ryHsKXmjKWDLB9lMBIZPfg%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="owD1R/HQ2S+8dSqTjeJt24AiIssn0flh6yayMTU+f0l1jtmlkvkTfcYdDarIU2nr6aLvspzh5pd7MJOcg8+mssN/7WwMLeFkaowqAuIfqtjISUKPPJxFvK5FKjErTQEik9YNs9DH4+/utVRRHaJZRDEpXpQ485p+wBXplOKB5E0=" class="">https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cjanmathijs.schoffelen%40donders.ru.nl%7C6118e6fdd6f34d13d4f408dc000261fe%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638385257435950519%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IT%2BTdD7oONzOrjCySts00%2FwVENqMUf13WF7zBwGzGO4%3D&reserved=0</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>