<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Bram,
<div class=""><br class="">
</div>
<div class="">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.</div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">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’.</div>
<div class=""><br class="">
</div>
<div class="">Some more information can be found in:</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://www.fieldtriptoolbox.org/workshop/paris2019/handson_raw2erp/" class="">https://www.fieldtriptoolbox.org/workshop/paris2019/handson_raw2erp/</a> (specifcies a cfg that uses coilaccuracy if I remember well).</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://www.fieldtriptoolbox.org/getting_started/neuromag/" class="">https://www.fieldtriptoolbox.org/getting_started/neuromag/</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathisj</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 16 Mar 2021, at 14:58, Knipscheer, B. (Bram) <<a href="mailto:B.Knipscheer@umcutrecht.nl" class="">B.Knipscheer@umcutrecht.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">Hello,<br class="">
<br class="">
I am trying to compute leadfields for MEG data with magnetometers and planar gradiometers (neuromag306).<br class="">
After loading the header I convert the units to meters (<i class="">hdr.grad  = ft_convert_units(hdr.grad,'m')</i>) to keep units everywhere the same (my headmodel and sourcemodel are also in m).<br class="">
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.<br class="">
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.<br class="">
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<span class="Apple-converted-space"> </span><i class="">lf=sens.tra*lf</i>.<br class="">
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.  <br class="">
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?<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><br class="">
For clarity, this is the code I’m using:<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">hdr                                       = ft_read_header(fif-file);<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">hdr.grad                             = ft_convert_units(hdr.grad,'m');<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">cfg                                       = [];<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">cfg.grad                             = hdr.grad;<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">cfg.headmodel                 = headmodel; %The headmodel is based on OpenMEEG<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">cfg.sourcemodel              = sourcemodel;<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">lf                                          = ft_prepare_leadfield(cfg);<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" style="font-family: "Segoe UI", sans-serif;" class="">Kind regards,<br class="">
<br class="">
Bram Knipscheer</span><span lang="EN-US" class=""><o:p class=""></o:p></span></div>
</div>
<hr style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<font size="-2" face="arial" class=""><i class="">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.</i></font></p>
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<font size="-2" face="arial" color="green" class=""><i class="">Denk s.v.p aan het milieu voor u deze e-mail afdrukt.</i></font></p>
<hr style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<font size="-2" face="arial" class=""><i class="">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.</i></font></p>
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<font size="-2" face="arial" color="green" class=""><i class="">Please consider the environment before printing this e-mail.</i></font></p>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>