<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<span style="font-family:Helvetica; font-size:12px">Hello,</span>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
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</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica; min-height:14px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
Digging a bit deeper into this showed me that in mne2grad.m file line number 420 ( fieldtrip-20160306) is the cause of the problem</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica; min-height:14px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
kChan = 0;<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
for n = chn_eeg</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
kChan = kChan+1;<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
<strong><em> if nEEG<=60</em></strong><span class="Apple-tab-span" style="white-space:pre">
</span><strong><em>% this if condition is the reason position was not written properly</em></strong><br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
elec.elecpos(kChan,1:3) = orig.chs(n).eeg_loc(1:3);</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
else</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
if kChan<=numel(dig_eeg)</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
elec.elecpos(kChan,1:3) = orig.dig(dig_eeg(kChan)).r;<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
else</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
ft_warning('not all EEG channel positions have been digitized');</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
elec.elecpos(kChan,1:3) = nan;</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
end</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
end</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
elec.label{kChan} = deblank(orig.ch_names{n});</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
end<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica; min-height:14px">
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
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</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica; min-height:14px">
<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
Kind regards<br>
</p>
<p style="margin-right:0px; margin-left:0px; font-size:12px; font-family:Helvetica">
Bushra Riaz<br>
</p>
<div><br>
<br>
</div>
<p><br>
</p>
</body>
</html>