I am working on a comparison between some of the different inverse algorithms along Brainstorm and Fieldtrip. For this purpose i am running a number of simulations where the brain surface gets divided in regions following the Desikan Killiani atlas. In each run a signal is placed in one of the parcellations (same signal for all sources within that area) and the EEG is simulated with a BEM headmodel. This EEG data gets processed for the inverse solution and with the leadfield and the inverse kernel an empirical Resolution matix gets calculated, from where I extract the Point location error (How much distance is between the ideal source active and the calculated one) and the Spatial deviation (how disperse is a solution).

The question or doubt that i have arises when comparing the solutions from the sLORETA algorithms between Fieldtrip and Brainstorm. In both cases i am using the same electrode array of 64 electrodes, same headmodel conductances, same regularization parameter and same signals. I have to confess that i could not get to use the same headmodel in both libraries so i expect some differences from this. So, when i get the results, in both i get the expected 0 Point location error but i get a huge spatial deviation in the case of brainstorm. This is very much apparent in the representation of the results. My doubt would be if this is due to some difference in the specific implementation of the same algorithm between the two libraries or if, in the other hand, i am messing it up because of the headmodel or other configuration parameters.

Here you can see an example, at the left is the representation from Brainstorm and at the right from Fieldtrip. Both cases are from the exact same signals.

Have you compared the output data?
It's hard to estimate the difference between the methods only by the visualization.
And even the visualization parameters in these two tools are not the same.

The color map and scale are not the same, and in these plots, you used the inflated brain in Brainstorm and the regular surface on Fieldtrip.

You may need for example to export the FT data and display it with brainstorm or visce versa.

Also, you said that you used different head models, so this may also affect your results. I recommend using the same methods/models on all steps, including the head model (not only the conductivities).
Fieldtrip has multiple variants of the BEM, while Brainstorm uses the OpenMeeg, and they may be different in the parameters.

I recommend using the same parameters in all the previous steps before comparing the inverse algorithms.

Yes, i compared the output data throug Point Location Error and Spatial Deviation metrics. These were calculated from the empirical Resolution matrix, being this the normalized average Resolution matrix for all parcellations activating all points in the sourcemodel (following this article). The spatial deviation in Brainstorm doubles the one from Fieldtrip or is even higher (median spatial deviation in FT=6.95 cm vs BS=14.43 cm).

The color map of the brain is obviously not a good way to quantify of definately compare but ir represented it in a really graphical way.

I will try to get the same headmodel in both toolboxes and see if this is the issue. A question arises from this point, if the headmodels are different, they would be only geometrywise speaking, conductances are the same and the electrode array is coherent with its respective head, could it justify that huge increase in deviation?

Yes, mainly the geometry, but probably some internal parameter of the forward solver.
My recommendation is to use the same forward model for your inverse investigations.
You can compute the forward model only in Brainstorm and then use it both on FT and BST for you inverse solution.

I have been trying to share headmodels from fieldtrip to brainstorm and viceversa to do as you recomended without success. Files are themselves really different to do it manually.

Is there some function to ease with the compatibility between toolboxes that i am missing?

If you use the BEM model so the out_fieldtrip_headmodel.m is supposed to convert a Brainstorm "headmodel.mat" structure to a FieldTrip leadfield structure.

Thanks a lot!! The function you provided solved it. Now I have the same elements in both fieldtrip and brainstorm (electrode array, regularization parameter, headmodel, EEG and leadfield). However the resulting metrics are hugely different still.

I am performing the tests between MNE and sLORETA (using EEG) for Fieldtrip and Brainstorm as my final master's project. And of course i can post the results here, I am running the final tests and when everything is clear i will post them here.

Thanks a lot for the two refferences, they are always helpful!