OpenMEEG results seem wrong

I wanted to compare OS and BEM forward models, but I got much larger differences than expected (median around 20%, but up to 1000%, and this is for the field vector amplitude, not power). Then I compared BEM with 1, 2 and 3 compartments and again the differences are much larger than I think they should be (10-100%). Here are some figures:

Those upper tails go above 100% but these sources [edit: after correcting figure mistake] are where you'd expect more error (near the surface boundaries and radial sources). This is comparing BEM with 1 (brain) or 2 (+skull) compartments:

BEM with 2 vs 3 compartments, or OS vs BEM look roughly similar. I got the same when selecting "adaptive integration" or not.

I hope it's something I did wrong, but maybe this is "normal" and just much worse than I expected. Can someone else reproduce this?


hi Marc,

can you clarify what you did? you compared openmeeg with and without using the integration points?

also can you test if this behavior is also observed with the older openmeeg version? the 2.2 used before last summer.


Hi Alex,
No, the integration points was something I did before this. It shouldn't be relevant since all this was with the default 4 points per coil. Again, unless I unknowingly did something wrong, I just compared BEM against OS and against itself with 1, 2 or 3 layers.
I would really not expect the small currents in the skull to change the observed field by 10-20% (but maybe I'm wrong?).

I've corrected my first post. In the cortex figure, I had "absolute values" turned on (and it's a plot of log(error)), so actually, the large errors are where we'd expect: superficial and radial sources. Sorry for that mistake.

I also tested a concentric sphere conductor. Here are the results, which look ok (though the sources are relatively far from the inner-skull surface in this spherical construction):

One thing I still don't understand is why 2 layers is much worse in the spherical case, while 1 and 3 layers are almost identical.

But did I just have wrong expectations? Is the error from ignoring the outer layers in a realistic head model really on the order of 10% for MEG?

I tested version 2.2. It produces very similar figures.

fyi, here is the comparison between 2.2.0 and 2.4.1 for a single compartment (inner skull) and adaptive integration. @Alexandre, is this what you'd expect? Mean 2% change, max ~5%.

ok so I don't think there is any bug. For the 2 layers my intuition is that you have a more abrupt change of conductivity between skull and air.


Less actually :slight_smile:

if you go from skull to air it's more abrupt change than if you go from skull, to skin to air. Unless I don't understand what you did with 2 layers


We must be thinking different things:
1 layer: brain (air), conductivity goes from 1 (arbitrary units) to 0.
2 layers: brain, skull (air), conductivity goes from 1 to 0.0125 to 0 (so smoother transition, no?).

With 3 layers, the currents in the scalp are probably on the same order as those in the skull? But again the conductivity jumps back to 1 in the scalp, so I'm not sure what you mean by a smoother transition in conductivity.

indeed it's actually a sharper transition... my bad

I have no good intuition then