[FieldTrip] EEG position information not read properly from fif file
Bushra Riaz Syeda
bushra.riaz at gu.se
Mon Mar 7 10:18:21 CET 2016
Hello,
I am reading fif files with only EEG data (no MEG data)in fieldtrip . When my sensor locations are more than 60 than the positions in the elec.elecpos are not written
Digging a bit deeper into this showed me that in mne2grad.m file line number 420 ( fieldtrip-20160306?) is the cause of the problem
kChan = 0;
for n = chn_eeg
kChan = kChan+1;
if nEEG<=60 % this if condition is the reason position was not written properly
elec.elecpos(kChan,1:3) = orig.chs(n).eeg_loc(1:3);
else
if kChan<=numel(dig_eeg)
elec.elecpos(kChan,1:3) = orig.dig(dig_eeg(kChan)).r;
else
ft_warning('not all EEG channel positions have been digitized');
elec.elecpos(kChan,1:3) = nan;
end
end
elec.label{kChan} = deblank(orig.ch_names{n});
end
I haven't read the whole source code for mne2grad.m to understand why this condition is important and why the limit is of 60 channels. I am solving my problem by changing this condition, I hope this will not effect rest of my processing
Kind regards
Bushra Riaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160307/7b37754e/attachment-0001.html>
More information about the fieldtrip
mailing list