[FieldTrip] inconsistent chanunit for Neuromag data
Steve Patterson
sapttrs at gmail.com
Fri Feb 27 03:53:25 CET 2015
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
More information about the fieldtrip
mailing list