[FieldTrip] Units for dipole moment retrieved through ft_dipolefitting

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed May 15 09:18:47 CEST 2024


Hi Guillermo,

The correct dealing with, and interpretation of physical units is a continued challenge indeed.

Wherever possible (at least for the metric units for geometrical objects) FieldTrip tries to ensure that they are equal before any relevant computations (e.g. convert if needed the metric units of the headmodel, if it’s different from the position information of the electrodes). I am not sure about the exact logic of which object has ‘precedence’ in determining the final units. If you want to be as sure as possible about the interpretation of the outcome units, I recommend to convert everything explicitly into SI-units:

all geometries in ‘m’ -> ft_convert_units(object, ‘m’) will do the trick (for elec and the position information in the headmodel)

and all functional data in ‘V’ (for the elec structure this requires a chanunit cell-array Nx1 with ‘V’, and for the functional data this might require an explicit scaling of ElectrodeVoltages).

the tricky bit will be the units of the transfer matrices in your head_model (because this is what I assume you pre-computed with your own forward solver), but that’s out of the scope of the fieldtrip code. I guess that if you know that the units there are also SI (i.e. only involving A,V,m) then you should be all set.

Basically, the long story short is that the low level ft_compute_leadfield computes the leadfield with units V/Am under the assumption that the input data is expressed in V’s and A’s and m’s.

Hope this helps,
JM



On 15 May 2024, at 04:07, Nunez Ponasso, Guillermo via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Dear FieldTrip community,

I am using the function ft_dipolefitting to retrieve the dipole position and moment from simulated EEG readings using my own forward solver (so I know the true solution).

First I created the raw data as follows:

raw = [];
raw.datatype = 'raw';
raw.time={zeros(1,Ntime_samples)};
raw.iseeg='yes';
raw.label=labels;
raw.chanunit='V';
raw.senstype='eeg';
raw.trial = {repmat(ElectrodeVoltages,1,Ntime_samples)};

for i = 0:(Ntime_samples-1)
    raw.time{1}(i+1)=i/Ntime_samples;
end

if ft_datatype(raw,'raw')
    disp("Raw data created succesfully.")
end

Where ElectrodeVoltages is an N_electrodes x 1 vector with values in Volts (V).

After this is done I do the following:

disp("Dipole fit with real initial value")
cfg = [];
cfg.numdipoles = 1;
cfg.gridsearch = 'no';
cfg.headmodel = head_model;
cfg.dip.pos = dip0.dip.pos;
cfg.elec=elec;

dip = ft_dipolefitting(cfg, raw);
disp("Dipole fit completed!")

Here, dip0.dip is the original dipole, for which I have the position dip0.dip.pos and moment information dip0.dip.mom. In other words, I do a dipole fit with the true dipole position as the intial position. The head model is a 3-layer model with millimeter units (mm).

Here is the structure that I get for dip.dip:

>> dip.dip

ans =

  struct with fields:

     pos: [-16.4780 -12.0334 47.4920]
     mom: [3×10 double]
     pot: [256×10 double]
      rv: [1.2740e-04 1.2740e-04 1.2740e-04 1.2740e-04 1.2740e-04 1.2740e-04 1.2740e-04 1.2740e-04 … ]
    unit: 'mm'

The distance and orientation of the fitted dipole are very close to the distance and orientation of the original dipole.

Now, the issue is that the moment of my original dipole is Ampere times meter (A m). But I don't know how I should interpret the output dipole moment. The only clue is the field dip.dip.unit ('mm').

If the units are Amperes times millimeters (A mm), then the difference between both dipole moments is very large. However, if the units are milli Amperes times millimeter (mA m), then we have very good agreement.

How can I know what are the units of the output?

Thank you!

Guillermo Nunez Ponasso
Post-doc, Electrical Engineering. WPI

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C3d1a06b94a494873c72508dc74af4340%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638513543300480206%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=opxgO2iMAy1zmAh4nJsEShTZU1TOHPZCMPahFcOiY%2Fs%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C3d1a06b94a494873c72508dc74af4340%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638513543300480206%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Q8DzVIlvleSCLSa3VETtk8P3wSo9tsAr%2FJfByoQcEbQ%3D&reserved=0>

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


More information about the fieldtrip mailing list