Leadfields/openmeeg - brainstorm vs fieldtrip

Hello,
I was trying to compute the leadfield matrix using openmeeg called from brainstorm as well as from fieldtrip. However, i obtained different results (whether i set the normalization parameter in fieldtrip or not). So, I would like to know what may cause such difference. Is their any normalization done in brainstorm that i am not aware of, for example?

Thank,
Sahar

Hi Sahar,

There are a lot of different reasons that can cause this discrepancy, for example:

  • The choice of locations of the source points
  • The segmentation of the head plus the labeled tissue conductivities
  • The chosen tissue conductivities

It is thus quite difficult to single out one reason.

Kind regards,
Steven

Thanks for you reply.

Actually, I have used the same conditions in both cases. I've imported the source and channel locations from brainstorm, as well as the BEM surfaces, and used the same conductivity values; and still got different results.

Hi saharallouch

You can not have exactly the same solution, as SBeumer mentioned it, it depends on a lot of parameters.

The methods in brainstorm and fieldtrip are different (equations, implementation, precision ....), therefore a difference may appear between the two solutions.

A quick check if the leadfield is correct is to display it. You check this page where similar method is used to display the leadfield.
This is just a qualitative comparison that checks that your leadfield are correct.

Best,
Takfarinas

First of all, you should start by comparing the temporary files that are generated by Brainstorm and FieldTrip in order to call OpenMEEG.
Using OpenMEEG to compute a forward model consists in a succession of system calls to the OpenMEEG binaries (executables called om_*). The parameters are passed to OpenMEEG as files.

In Brainstorm, the temporary files passed to OpenMEEG are saved in $HOME/.brainstorm/tmp/.
The sequence of OpenMEEG calls can be studied by adding for instance a line disp(strCall); after line 544 in bst_openmeeg.m.
https://github.com/brainstorm-tools/brainstorm3/blob/master/toolbox/forward/bst_openmeeg.m#L544

The sequence of calls, the parameters given to the executables or the contents of the files may vary between the two programs: you need to check all this.
Unfortunately, I don't know how this is handled by FieldTrip, I can't give you any information on how to do it.

Another difference can be the version of OpenMEEG that is used. Even when you have OpenMEEG installed on your system, Brainstorm might install its own local version in $HOME/.brainstorm/openmeeg. To check this: delete this folder and try again running OpenMEEG from Brainstorm. If it download a new version of OpenMEEG, check the version of the executables in $HOME/.brainstorm/openmeeg (run them from a terminal).

The post-processing of the forward model might be different as well.
In Brainstorm, additional operations are executed after calling OpenMEEG, but only for CTF MEG: