[FieldTrip] inconsistent chanunit for Neuromag data

Robert Oostenveld r.oostenveld at donders.ru.nl
Tue Mar 3 22:14:42 CET 2015


Hi Steve

The grad.chanunit pertains to the units that would be computed as the forward solution. The hdr.chanunit pertains to the units of the channel-level data.

Using the ft_convert_units helper function you could convert the units of the gradiometer definition from cm to mm or m. This changes the baseline of the planar gradiometers with a factor of 10 or 100. However, the planar gradient chanel data is not updated simultaneously and remains in the same units (fieldstrength per distance). So it can happen that grad.chanunit and hdr.chanunit are inconsistent. 

The consequence (which many people on the list will have noticed, but might not have understood) is that the forward solution - and therefore the inverse solution -  for the Elekta planar gradiometer channels can easily be incorrect: due to the data being in T/m and the forward solution in T/cm (or some other units, I don’t know the typical units from the top of my head). As long as you always use the same pipeline on hte planar gradiometers, you will most likely not notice since you will be interpreting the sourc estimates in “arbitrary units” anyway. But if you were to combine the planar channels with the magnetometers, the planar channels (fieldstrength per distance) would be affected differently than the manetometer channels (fieldstrength) by your choise of geometrical units. 

Using the ft_datatype_sens helper function you can ensure that the scaling of the grad structure (which affects the “coilpos" field but also the rows of the “tra" field that correspond to the planar channels) is consistent with your channel level data. If you specify all your data in SI units (T, m, V, etc.) the units of the forward computations will be correct and hence the units of the inverse estimates will also be consistent in SI units (e.g. dipole moment in A/m). The thing is that the different fieldtrip import functions (which come from various origins) return data in non-SI units more often than not :-(

If you work with channel level data, SI units are often not nice. ERFs in Tesla are very small (10^-12). ERPs are usually expressed in uV. Also for anatomcial MRIs it is not convenient to express data in SI units (m) and mm is common. The CTF system by default expresses geometrical distance in cm. Etc… So all systems by themselves made their own “convenient” choices. But if all the data comes together with the physical model, it becomes a mess. The logical choice to solve the inconsistencies is to express it in SI units. 

I hope this helps in clarifying the situation.

best regards,
Robert

PS if you search on bugzilla, you can see some (still open) bugs that pertain to this

 

 





 

 








On 27 Feb 2015, at 03:53, Steve Patterson <sapttrs at gmail.com> wrote:

> Hello,
> 
> I noticed that fieldtrip produces inconsistent channel units when I
> read in Neuromag (vectorview) data.
> 
> For example:
> 
> %%%%%%%%%%%%%%%%%%%%%%%%
> 
> cfg                                = [];
> cfg.dataset                   = 'example.fif';
> cfg.trialfun                    = 'ft_trialfun_general';
> cfg.trialdef.eventtype    = 'STI101';
> cfg.trialdef.eventvalue  = [17 18 20];
> cfg.trialdef.prestim       = 0.500;
> cfg.trialdef.poststim     = 1.000;
> cfg                                = ft_definetrial(cfg);
> data                              = ft_preprocessing(cfg);
> 
> disp(data.hdr.chanunit(1:6));
> 'T/m'
> 'T/m'
> 'T'
> 'T/m'
> 'T/m'
> 'T'
> 
> disp(data.grad.chanunit(1:6));
> 'T'
> 'T'
> 'T'
> 'T'
> 'T'
> 'T'
> 
> %%%%%%%%%%%%%%%%%%%%%%%%
> 
> data.hdr.chanunit is correct and data.grad.chanunit is wrong.
> 
> data.grad.chanunit must take precedence in further analysis, because
> I've noticed this causes problems downstream.
> 
> For example, when using ft_dipolesimulation, the simulated data on the
> gradiometer channels is too small in amplitude by a factor of
> 1/(16.8E-3) (the distance between the gradiometer coil pair in
> meters).
> 
> This is reflected in the grad.tra matrix, whose non-zero values are
> all 1's and -1's, whereas they should be 1's (magnetometers), and +/-
> 1/16.8E-3 (gradiometers).
> 
> If you could fix this, it would be much appreciated!
> 
> thanks,
> 
> Steve
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list