[FieldTrip] Omission in ft_compute_leadfield for MEG and OpenMEEG headmodel

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Jan 12 17:07:53 CET 2021

Dear Bram,

This could very well be, it looks as if you have already looked into this. The best way forward would be to send us some small data file (containing a headmodel (i.e. the geometries) and a gradiometer array description, a.k.a. sens) + a few lines of code that allow us to swiftly reproduce your issue. We could try and whip up something ourselves but we like to delegate :).

Could you file an issue on the fieldtrip github page (https://github.com/fieldtrip/fieldtrip) and send me the data off list (through e-mail if small enough, or otherwise through some other means)?

Thanks and with best wishes,

On 12 Jan 2021, at 15:34, Knipscheer, B. <B.Knipscheer at umcutrecht.nl<mailto:B.Knipscheer at umcutrecht.nl>> wrote:

Dear all,
There seems to be an omission in the ft_compute_leadfield script causing some problems down the line. Can someone check if my observations are correct?
In the most recent version of ft_compute_leadfield, when calculating the leadfields for MEG using a headmodel based on OpenMEEG, this is done for the MEG coils and not the sensors.
There seems to be a few lines missing. These lines are:
  if isfield(sens, 'tra')
    % construct the channels from a linear combination of all magnetometer coils
    lf = sens.tra * lf;
These lines are present in the code for other headmodel types and convert lf per coil to lf per sensor.
These missing lines subsequently causes the leadfield matrix to be modified in ft_sourceanalysis. Since the number of labels is less than the number of coils, the leadfield matrix is truncated, losing a certain amount of leadfields.

My suggestion is to include the aforementioned lines in ft_compute_leadfield. Please let me know what you think!

Kind regards,

Bram Knipscheer


De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt, wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. Het Universitair Medisch Centrum Utrecht is een publiekrechtelijke rechtspersoon in de zin van de W.H.W. (Wet Hoger Onderwijs en Wetenschappelijk Onderzoek) en staat geregistreerd bij de Kamer van Koophandel voor Midden-Nederland onder nr. 30244197.

Denk s.v.p aan het milieu voor u deze e-mail afdrukt.


This message may contain confidential information and is intended exclusively for the addressee. If you receive this message unintentionally, please do not use the contents but notify the sender immediately by return e-mail. University Medical Center Utrecht is a legal person by public law and is registered at the Chamber of Commerce for Midden-Nederland under no. 30244197.

Please consider the environment before printing this e-mail.

fieldtrip mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210112/a615f4fe/attachment.htm>

More information about the fieldtrip mailing list