[FieldTrip] Deviations in Inverse Solutions between Fieldtrip and MNE-C packages?
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Fri Nov 15 17:52:32 CET 2019
Dear Burkhard,
It’s a bit unintuitive, but for the prewhitening to take effect, you also need to supply a noisecov matrix in the cfg, which is used for the prewhitening. Otherwise, the pinv is still used. See line 183 in minimumnormestimate.
Best wishes,
JM
> On 15 Nov 2019, at 16:06, Burkhard Maess <maess at cbs.mpg.de> wrote:
>
> Dear Jan-Mathijs,
>
> thank you very much for your prompt response.
> I had used just magnetometers to avoid the channeltype problems. So these tricks of MNE-C should be not important here.
>
> I had played around with the available options for ft_minimumnormestimate, but no change in the observations: so far solutions by ft_minimumnormestimate were always deviating from the expectations. There should be the strongest activity within the temporal areas and what I get is strongest activity in frontal and occipital areas.
>
> As an additional experiment, I did not deliver the leadfield computed with ft_prepare_leadfield using the folded cortex, but let ft_minimumnormestimate recompute the leadfield. In this case, ft_minimumnormestimate takes a shrunken copy of the inner skull surface of the skull as a basis for the sourcespace. This means that now just the single layer BEM model was originally prepared by MNE-C. Everything else is prepared by freesurfer. Furthermore, I simplified the grad-structure in a way that it comes with the dimensionality of 102 (number of magnetometers), whenever possible.
> Below are the options I used for this computation together with the matlab code used to compute the minimum norm estimate and to prepare the attached figure. The solution appears as if the coregistration was not successful, but the sensor position plot over the brain looks good. And if the coregistration is wrong, why does the sloreta estimate follow the expectations?
>
> Do you have further suggestions to investigate?
> best regards,
> Burkhard
>
>
>
> cfg = [];
> cfg.method = 'mne';
> cfg.headmodel = headmodel;
> cfg.latency = 'all';
> cfg.mne.lambda = 0.03;
> cfg.mne.prewhiten = 'yes';
> cfg.mne.scalesourcecov = 'yes';
> cfg.mne.normalize = 'yes';
> source = ft_sourceanalysis(cfg, tl);
> bnd.pnt=headmodel.bnd.pos;
> bnd.tri=headmodel.bnd.tri;
> mom=sqrt(source.avg.pow(:,n100_index));
> figure;
> ft_plot_mesh(bnd,'vertexcolor',mom);
> ft_plot_sens(tl.grad, 'chantype', 'megmag','style','square')
> ...............................................
>>> cfg.headmodel
>
> ans =
>
> struct with fields:
>
> bnd: [1×1 struct]
> type: 'singleshell'
> unit: 'cm'
> cfg: [1×1 struct]
>
>>> cfg.headmodel.bnd
>
> ans =
>
> struct with fields:
>
> pos: [2562×3 double]
> tri: [5120×3 int32]
> coordsys: 'neuromag'
> inside: [2562×1 logical]
>
>>> tl
>
> tl =
>
> struct with fields:
>
> avg: [102×151 double]
> var: [102×151 double]
> time: [1×151 double]
> dof: [102×151 double]
> label: {102×1 cell}
> dimord: 'chan_time'
> cov: [102×102 double]
> grad: [1×1 struct]
> cfg: [1×1 struct]
>
>>> tl.grad
>
> ans =
>
> struct with fields:
>
> chanori: [102×3 double]
> chanpos: [102×3 double]
> chantype: {102×1 cell}
> chanunit: {102×1 cell}
> coilori: [102×3 double]
> coilpos: [102×3 double]
> coordsys: 'neuromag'
> label: {102×1 cell}
> type: 'neuromag306'
> unit: 'cm'
>
>
> --
> Dr. Burkhard Maess
> Brain Networks (@brainnetleipzig)
> Max Planck Institute for Human Cognitive and Brain Sciences
> Stephanstr. 1a, D-04301 Leipzig, Germany
> phone/fax: +49 341 9940-2526/-2511 https://www.cbs.mpg.de/~maess
>
> ----- Original Message -----
> | From: "Jan-Mathijs Schoffelen" <jan.schoffelen at donders.ru.nl>
> | To: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
> | Sent: Friday, 15 November, 2019 13:07:41
> | Subject: Re: [FieldTrip] Deviations in Inverse Solutions between Fieldtrip and MNE-C packages?
>
> | Dear Burkhard,
> |
> | I don’t know about the unexpected eLoreta results (this code has been
> | contributed by Guido Nolte), but in general I suspect that MNE-C has some
> | clever tricks up its sleeve to deal with the different channel types / rank
> | deficiency of the data, which is something you need to account for explicitly
> | in FieldTrip. I don’t know why sLoreta would be more robust against this, but
> | that’s how it is.
> |
> | For now, I suggest to follow the suggestions in the minimumnormestimate tutorial
> | website, where recommendations are given for the appropriate cfg. Importantly,
> | the default MNE is just a pinv of the leadfield matrix, which is probably not
> | ideal. You’d want to switch on the prewhitening (this is currently still done
> | for the MNE method in the minimumnormestimate function), as well as
> | regularization.
> |
> | Best wishes,
> | Jan-Mathijs
> |
> |
> |> On 15 Nov 2019, at 13:01, Burkhard Maess <maess at cbs.mpg.de> wrote:
> |>
> |> Dear Frieldtrip experts,
> |>
> |> since I like to use freesurfer segmentations and the nicely prepared
> |> coupling with MNE, I took some effort to import those volume conductors
> |> and source space models into fieldtrip as well. This seems to work as
> |> fas as it concerns the geometric representation in space (the
> |> coregistration - pp04a_volume_sources.png). The coregistration was made
> |> via MNE-C and also imported into fieldtrip. In summary, I am using the
> |> same model (volume conductor + source space), the same coregistration
> |> and the same data.
> |>
> |> For visualization, I have attached figures made by either MNE-C or by
> |> matlab/fieldtrip. In general, all attached jpg-files were generated
> |> using MNE-C and all png-files were produced by matlab/fieldtrip.
> |> Attached figs can be downloaded from this file share:
> |> https://owncloud.gwdg.de/index.php/s/19WpPrV5Dw0gD28
> |>
> |> Using sloreta as the inverse method, there is also a reasonable match
> |> between both packages of software. Please check the attached files
> |> pp04a_sloreta_90ms*.{jpg,png} .
> |>
> |> However, what is when using a different method, e.g. minimum norm
> |> estimates? Please see the corresponding pics: pp04a_mne_90ms*.{jpg,png}.
> |> The MNE solution estimated via MNE-C is similar to the sloreta solution.
> |> Fieldtrip, however, estimates something completely different. The MNE
> |> solution by fieldtrip rather appears to have some meshing problem, or
> |> so? The same pattern can also be observed for different subjects' data.
> |> Fieltrip also offers eloreta as a method - again a different solution,
> |> but also very unexpected (no figs attached, though).
> |>
> |> What could be possible reasons for this unexpected behaviour?
> |>
> |> Regularization? Covariance matrices? Here is the relevant part in my
> |> matlab script which switches between the methods. Which options do I
> |> need to activate in case of the 'mne'-method or the 'eloreta' method -
> |> both deviating strongly from the expected solution.
> |>
> |> %% Source localization using different methods
> |> % sourcemethod = 'sloreta';
> |> % sourcemethod = 'eloreta';
> |> sourcemethod = 'mne';
> |> cfg = [];
> |> cfg.method = sourcemethod;
> |> cfg.grid = leadfield;
> |> cfg.headmodel = headmodel;
> |> cfg.latency = 'all';
> |> cfg.mne.lambda = 0.03;
> |> cfg.eloreta.lambda = 0.03;
> |> cfg.sloreta.lambda = 0.03;
> |> source = ft_sourceanalysis(cfg, tl);
> |>
> |> If needed, I could share all data files needed to run the same analysis
> |> on your computer.
> |>
> |> Hints would be much appriciated - thank you very much in advance,
> |>
> |> all the best,
> |>
> |> Burkhard
> |>
> |>
> |>
> |>
> |>
> |>
> |> --
> |> Dr. Burkhard Maess
> |> Brain Networks (@brainnetleipzig)
> |> Max Planck Institute for Human Cognitive and Brain Sciences
> |> Stephanstr. 1a, D-04301 Leipzig, Germany
> |> phone/fax: +49 341 9940-2526/-2511 mail: maess 'at' cbs.mpg.de,
> |> http://www.cbs.mpg.de
> |>
> |> _______________________________________________
> |> fieldtrip mailing list
> |> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> |> https://doi.org/10.1371/journal.pcbi.1002202
> |
> |
> | _______________________________________________
> | fieldtrip mailing list
> | https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> | https://doi.org/10.1371/journal.pcbi.1002202
> <pp04a_mne-flatcortex_90ms_lh_ft.png>_______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list