[FieldTrip] Converting units of hdr.sens.tra matrix when computing leadfields

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Wed Mar 17 10:28:23 CET 2021


Hi Bram,

1) a ‘leadfield’ matrix, or more accurately the gain matrix that transforms from sources to a sensor measurements has as physical units <device measurement units>/<dipole strength units>, i.e. something like T/Am or so, if we’d stick to SI units.
2) indeed the ’tra’ matrix (in an MEG sensor array description that is) transforms from the magnetic field measured at individual coils (defined in T) to the signal represented at a sensor. For a gradiometer, this is where distance (and their units) come in. A gradiometer reflects how much the magnetic field changes as a function of the distance between the coils. Thus, for (planar) gradiometer sensors, the corresponding rows in the tra-matrix actually have a unit, which is 1/<units of distance>. Therefore, by design those values change, if you move from ‘m’ to ‘cm’ (or vice versa) in the units.

Note, for elekta data, to be sure that everything goes consistent w.r.t. units, you may need to ensure that you read in the sensor array information using the additional option ‘coilaccuracy’.

Some more information can be found in:

https://www.fieldtriptoolbox.org/workshop/paris2019/handson_raw2erp/ (specifcies a cfg that uses coilaccuracy if I remember well).

https://www.fieldtriptoolbox.org/getting_started/neuromag/


Best wishes,
Jan-Mathisj



On 16 Mar 2021, at 14:58, Knipscheer, B. (Bram) <B.Knipscheer at umcutrecht.nl<mailto:B.Knipscheer at umcutrecht.nl>> wrote:

Hello,

I am trying to compute leadfields for MEG data with magnetometers and planar gradiometers (neuromag306).
After loading the header I convert the units to meters (hdr.grad  = ft_convert_units(hdr.grad,'m')) to keep units everywhere the same (my headmodel and sourcemodel are also in m).
While this converts variables such as chanpos and coilpos correctly, it also converts the values corresponding to the gradiometers in the hdr.grad.tra matrix.
These values are e.g. -0.5952 and 0.5952 for the gradiometers and are 1 for magnetometers and are converted to -59.52 and 59.92 and 1 respectively.
The next step is using ft_prepare_leadfield and therefore ft_compute_leadfield, which computes the lf for every coil and then transforms this to lf for every sensor with the line lf=sens.tra*lf.
The results is that the lf matrix gets scaled because the units of sens.tra were converted to m. This seems incorrect, as this step should only transform lf per coil to lf per sensor.
Is this indeed incorrect? The question is if the values in hdr.grad.tra for gradiometers have a unit (T/cm or T/m) or that this should be a unitless scaling factor? Additionally, what is the unit of the leadfields?

For clarity, this is the code I’m using:
hdr                                       = ft_read_header(fif-file);
hdr.grad                             = ft_convert_units(hdr.grad,'m');
cfg                                       = [];
cfg.grad                             = hdr.grad;
cfg.headmodel                 = headmodel; %The headmodel is based on OpenMEEG
cfg.sourcemodel              = sourcemodel;
lf                                          = ft_prepare_leadfield(cfg);

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
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

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


More information about the fieldtrip mailing list