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?
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.
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.
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.
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: