DICS_wrong_hemisphere_reconstruction

External Email - Use Caution

Dear Mne team,

I am trying to reproduce a DICS source reconstruction in beta band obtained
in Fieldtrip, to validate the pipeline. I get a weird result because the
expected right frontal activation that occurs in Fieldtrip is located in
the left hemisphere in MNE (see the pictures). It looks like the
hemispheres are swapped. (Fieldtrip result match fmri activation on the
same study).

Do you have any idea what could be causing this?

Thanks
Edoardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/92ef8995/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mne_source.png
Type: image/png
Size: 74265 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/92ef8995/attachment-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fieldtrip_source.jpg
Type: image/jpeg
Size: 27189 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/92ef8995/attachment-0001.jpg

External Email - Use Caution

hi,

it's really hard to tell without looking at the 2 codes (fieldtrip and mne)

first thing I would check is that the forward models are valid using

https://secure-web.cisco.com/1P9dcoglvPsP0-6DtSXpF95SCMJ5_FtyShUylLftAdd2sWcyXtonMBSWqYJzu7G0hsC286na11HyhIU7w5X80X4VF0_7SwbUfnO0l9u8ekCKl-p4iuf0wKcf1onz3sK4eCvqWjaLB7aiZAyesSDdWa51eR5i-7QUS2zRgdWb6DvRGwZWVIxEpBt1dPn7A0_2RmTohpXuaN9A1-i2SjJaox26TRAVDPHB399WvgYoaI40TkeSxKsv9PB43SIIeSRaiUofYn96AtcwmwLiTi18a_w/https%3A%2F%2Fmne.tools%2Fstable%2Fgenerated%2Fmne.sensitivity_map.html

Alex

External Email - Use Caution

Hi Alex,

I used the function you suggest, it looks fine no ?

        External Email - Use Caution

hi,

it's really hard to tell without looking at the 2 codes (fieldtrip and mne)

first thing I would check is that the forward models are valid using

*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
mne.sensitivity_map — MNE 1.6.0 documentation
<https://secure-web.cisco.com/1P9dcoglvPsP0-6DtSXpF95SCMJ5_FtyShUylLftAdd2sWcyXtonMBSWqYJzu7G0hsC286na11HyhIU7w5X80X4VF0_7SwbUfnO0l9u8ekCKl-p4iuf0wKcf1onz3sK4eCvqWjaLB7aiZAyesSDdWa51eR5i-7QUS2zRgdWb6DvRGwZWVIxEpBt1dPn7A0_2RmTohpXuaN9A1-i2SjJaox26TRAVDPHB399WvgYoaI40TkeSxKsv9PB43SIIeSRaiUofYn96AtcwmwLiTi18a_w/https%3A%2F%2Fmne.tools%2Fstable%2Fgenerated%2Fmne.sensitivity_map.html&gt;

Alex

        External Email - Use Caution

Dear Mne team,

I am trying to reproduce a DICS source reconstruction in beta band
obtained in Fieldtrip, to validate the pipeline. I get a weird result
because the expected right frontal activation that occurs in Fieldtrip is
located in the left hemisphere in MNE (see the pictures). It looks like the
hemispheres are swapped. (Fieldtrip result match fmri activation on the
same study).

Do you have any idea what could be causing this?

Thanks
Edoardo
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
*MailScanner has detected a possible fraud attempt from
"secure-web.cisco.com" claiming to be*
Mne_analysis Info Page
<https://secure-web.cisco.com/1XZQs6Tz5aUmdk7D92fuWwfznEkpX2YzQT-SkE1Di6Zfwg7d5xINvODtL9akeyijBjAbNT306UPhKuBhSfBa1QHbuKrbZnOUauo48Z2e_WxNzZ-iJcf0I_f9ahCmvALITT6bbAtTdnryzdQLeh-bOwSFp5QV_MBicvA_DspFQXfgPTsGh0dDdJQIUKFNQm9uUFirBc0NdSDUTSG15LftMVo23GD2SIFCCMQMnSzd-xLTTdTX9VjWPkNLJaPSTLKMAr5KD67r-A5aEizI1T66hSg/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis&gt;

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/0ac9d785/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sensitivity_left.png
Type: image/png
Size: 310799 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/0ac9d785/attachment-0004.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sensitivity_right.png
Type: image/png
Size: 313412 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/0ac9d785/attachment-0005.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orientation.png
Type: image/png
Size: 19018 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/0ac9d785/attachment-0006.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leadfield.png
Type: image/png
Size: 274216 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201201/0ac9d785/attachment-0007.png

External Email - Use Caution

Those seem okay. Also check to make sure your FieldTrip DICS result was not
affected by this bug:

https://secure-web.cisco.com/145Qiy-fcTYp--8U0zxCpVEQ6ubovMi7AYnO_K-x1llXqqS_rAQSqBNJLpQJV_QhUBmXg9kSTeYnPQPe_yfB3JmSxdHnenQSjIVQezrL25BnH1Hqu_SjCSFPdlZSZ_Xoz9Ou2bvSbjTDfIp8REjy2rMCuej6y-zRehn90FL9UqmXGyRURFLW-NpeFS8STWIkS4ipwMfWH2wq1YBbbMrHTaa2tPb5RTuNJjHIxs9X4waAbzaacpq4jY3wH3giJSXwelldnd_KCdmiZMyk5afdgPQ/https%3A%2F%2Fgithub.com%2Ffieldtrip%2Ffieldtrip%2Fpull%2F1599

We are currently working on making sure FieldTrip and MNE produce
consistent beamforminng results -- so far LCMV is consistent now but DICS
is still a work in progress.

Eric

External Email - Use Caution

We checked with the lcmv also in Fieldtrip and results were confirmed, so
there was no effect of the DICS bug. I still get the maximum peak frontal
but in the opposite hemisphere. Do you have another idea where there could
be a flip right/ left ? mri conventions, coordinates and so on

thanks

External Email - Use Caution

Do you have another idea where there could be a flip right/ left ? mri
conventions, coordinates and so on

1. To check these I would use `plot_alignment` in MNE-Python to check to
make sure everything is defined properly. Then if you use the same
src/trans/bem in make_forward_solution it should all be correct.
2. It's possible we are hitting some rank bug, see for example

3. You might need to use reduce_rank=True as in this example
<https://secure-web.cisco.com/13MsdCox5KdzEpkrHMoAukWFSeMSbQzGuM0nRfQFGr7oaJ8uyROq_2nFM41F8P2DmnxF03hvqeB8I0Ao6OUFluoTL9Mtka3zYJqHIp8K7eRUGxWXuR5BskgNzlfNwDJ6UK8oEb3tjXAaNlPBQy3X43EbHnN0_YKdHKGexmausx9AJqM_zI3M8iTdyon8qNz_IBnSjLgtOEpgAxgt2Uz4R7JQe4ebaLWv7xbMCT5XU6BZH953ICan7D2pyaeQVFeFQOgG_0jSTj5bNrIUrrEWNHg/https%3A%2F%2Fmne.tools%2Fdev%2Fauto_examples%2Finverse%2Fplot_dics_source_power.html%23sphx-glr-auto-examples-inverse-plot-dics-source-power-py&gt;\.
It's possible FT reduces rank by default and we do not, so make sure
parameters match.
4. Can you also try doing `real_filter=True` to see if it helps? We are
looking into orientation selection for the complex filters currently, it
seems like FT produces better results for the complex.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201202/ff97906e/attachment.html

External Email - Use Caution

do you have an evoked component to localize with the same subject and
forward model to check?

Alex

External Email - Use Caution

Hi Alex and Eric,

first of all thanks for the help.

1) I will try lcmv on evoked with both toolbox, I only checked on beta
filtered data and lcmv and results were similar as before

2) alignment looks fine to me (attached plot)
3) I checked the reduce rank but did not help
4) real_filter was always set to True
filters1 = make_dics(info=info, forward=fwd, csd=csd,
reg=reg,reduce_rank=True, pick_ori=None,
real_filter=True,normalize_fwd=False,inversion='matrix', weight_norm=None)

5) I computed the csd in a similar way in mne but i will try to pass the
data I had in fieldtrip so the beamformer gets exactly the same data.
6) I will check another subject and let you know if I observe similar
pattern.

        External Email - Use Caution

Do you have another idea where there could be a flip right/ left ? mri

conventions, coordinates and so on

1. To check these I would use `plot_alignment` in MNE-Python to check to
make sure everything is defined properly. Then if you use the same
src/trans/bem in make_forward_solution it should all be correct.
2. It's possible we are hitting some rank bug, see for example *MailScanner
has detected a possible fraud attempt from "secure-web.cisco.com" claiming
to be* MRG: Fix DICS rank handling by wmvanvliet · Pull Request #8594 · mne-tools/mne-python · GitHub
<https://secure-web.cisco.com/1o_lH-k4rHSYPhDzjd__shBfyihVFumwSV_W9W_OMpoll5YYDcxtValRvb9okGVShJsvTRZCV6hb00YuaKjRtY-iOGJ3UoWZUpZ-sdLKjb4NlS51yYibeBLjxDpYR8YHYFgdj8D7b7UBs_NcHgjB2mGiF6YU_LykyrQMfZxUsLXBxZm5XvNZJoeOUimYbUdIFjPCJYD8x2jC1QNM1uPhqxnZsey0r8j7ToEQaxHBPbfQgZimyQvYW3T2JOGFQNGTSidhSMqzFkqKwTkLEIgm4ng/https%3A%2F%2Fgithub.com%2Fmne-tools%2Fmne-python%2Fpull%2F8594&gt;
3. You might need to use reduce_rank=True as in this example
<https://secure-web.cisco.com/13MsdCox5KdzEpkrHMoAukWFSeMSbQzGuM0nRfQFGr7oaJ8uyROq_2nFM41F8P2DmnxF03hvqeB8I0Ao6OUFluoTL9Mtka3zYJqHIp8K7eRUGxWXuR5BskgNzlfNwDJ6UK8oEb3tjXAaNlPBQy3X43EbHnN0_YKdHKGexmausx9AJqM_zI3M8iTdyon8qNz_IBnSjLgtOEpgAxgt2Uz4R7JQe4ebaLWv7xbMCT5XU6BZH953ICan7D2pyaeQVFeFQOgG_0jSTj5bNrIUrrEWNHg/https%3A%2F%2Fmne.tools%2Fdev%2Fauto_examples%2Finverse%2Fplot_dics_source_power.html%23sphx-glr-auto-examples-inverse-plot-dics-source-power-py&gt;\.
It's possible FT reduces rank by default and we do not, so make sure
parameters match.
4. Can you also try doing `real_filter=True` to see if it helps? We are
looking into orientation selection for the complex filters currently, it
seems like FT produces better results for the complex.

Eric

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201202/a604f4bc/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: headDense.png
Type: image/png
Size: 179282 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201202/a604f4bc/attachment-0003.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brainFront.png
Type: image/png
Size: 166164 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201202/a604f4bc/attachment-0004.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: headFrontal.png
Type: image/png
Size: 150118 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201202/a604f4bc/attachment-0005.png

External Email - Use Caution

Hi,

I investigated a little more about the wrong bemforming reconstruction (it
was the same with different beamforming methods).
I imported the source model and the bem from mne to fieldtrip but I load
the grad structure directly from Fiedltrip and as you can see in the
mne_.jpg they don t have the same coordinates. Then I took the inverse of
the transformation matrix ctf_head_t and applied to the headmodel and
sourcemodel to get cft_aligned.jpg. I finally performed the DICS
beamoforming with exactly the same CSD data and I get the peak on the
frontal right hemisphere this time, like I was trying to replicate.

On the other hand if I apply a different transformation matrix to the grad
( to bring everything aligned with the imported headmodel and
sourcemodel from mne) the peak is on the frontal left. So I guess I have a
problem with the coordinates and there is not flipping or other issue in
the source model or beamforming method.

Should I bring everything to ctf coordinates in mne ? do you know why this
happened?

thanks

        External Email - Use Caution

Do you have another idea where there could be a flip right/ left ? mri

conventions, coordinates and so on

1. To check these I would use `plot_alignment` in MNE-Python to check to
make sure everything is defined properly. Then if you use the same
src/trans/bem in make_forward_solution it should all be correct.
2. It's possible we are hitting some rank bug, see for example *MailScanner
has detected a possible fraud attempt from "secure-web.cisco.com" claiming
to be* MRG: Fix DICS rank handling by wmvanvliet · Pull Request #8594 · mne-tools/mne-python · GitHub
<https://secure-web.cisco.com/1o_lH-k4rHSYPhDzjd__shBfyihVFumwSV_W9W_OMpoll5YYDcxtValRvb9okGVShJsvTRZCV6hb00YuaKjRtY-iOGJ3UoWZUpZ-sdLKjb4NlS51yYibeBLjxDpYR8YHYFgdj8D7b7UBs_NcHgjB2mGiF6YU_LykyrQMfZxUsLXBxZm5XvNZJoeOUimYbUdIFjPCJYD8x2jC1QNM1uPhqxnZsey0r8j7ToEQaxHBPbfQgZimyQvYW3T2JOGFQNGTSidhSMqzFkqKwTkLEIgm4ng/https%3A%2F%2Fgithub.com%2Fmne-tools%2Fmne-python%2Fpull%2F8594&gt;
3. You might need to use reduce_rank=True as in this example
<https://secure-web.cisco.com/13MsdCox5KdzEpkrHMoAukWFSeMSbQzGuM0nRfQFGr7oaJ8uyROq_2nFM41F8P2DmnxF03hvqeB8I0Ao6OUFluoTL9Mtka3zYJqHIp8K7eRUGxWXuR5BskgNzlfNwDJ6UK8oEb3tjXAaNlPBQy3X43EbHnN0_YKdHKGexmausx9AJqM_zI3M8iTdyon8qNz_IBnSjLgtOEpgAxgt2Uz4R7JQe4ebaLWv7xbMCT5XU6BZH953ICan7D2pyaeQVFeFQOgG_0jSTj5bNrIUrrEWNHg/https%3A%2F%2Fmne.tools%2Fdev%2Fauto_examples%2Finverse%2Fplot_dics_source_power.html%23sphx-glr-auto-examples-inverse-plot-dics-source-power-py&gt;\.
It's possible FT reduces rank by default and we do not, so make sure
parameters match.
4. Can you also try doing `real_filter=True` to see if it helps? We are
looking into orientation selection for the complex filters currently, it
seems like FT produces better results for the complex.

Eric

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201208/f621b1e8/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mne_.jpg
Type: image/jpeg
Size: 79335 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201208/f621b1e8/attachment-0002.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctf_aligned.jpg
Type: image/jpeg
Size: 77082 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201208/f621b1e8/attachment-0003.jpg