<div dir="ltr"><div><div><div>Hi,<br><br>I've been trying for a while to find the
source of an apparent swapping of channels in my data, and I suspect
that the source of this issue comes from the ft_read_data function when
it is used with egi_mff_v1. This code does not handle very well list of
channel indexes that are not ordered. I am using:<br><br>chanindx = [36, 224, 37, 18, 21, 109, 153, 101];<br>data = ft_read_data([path fileNames(iFile).name], 'headerformat', ...<br> 'egi_mff_v1', 'dataformat', 'egi_mff_v1', ...<br> 'header', header, ... <br> ... #'begsample', begsample, 'endsample', endsample, ...<br> 'chanindx', chanindx);<br><br></div>...
and I have a strong suspicion that the 8 columns of the data matrix are
ordered as if chanindx == [18, 21, 36, 37, 101, 109 153, 224]<br><br></div>I think it has to do with ft_read_data code:<br><br> for iSig = 1:length(hdr.orig.signal)<br> % adjust chanindx to match with current signal<br> [dum1, dum2, chanind_sig] = intersect(chanindx, find(chan2sig_ind==iSig));<br> if isempty(chanind_sig)<br> % no channels requested from current signal<br> else<br> blockhdr = hdr.orig.signal(iSig).blockhdr<wbr>;<br> signalname = binfiles(iSig).name;<br> <br></div> %%%%%%%%%%%% ... skipping lines of codes ... %%%%%%%%%%<br><div> <br> dat{end} = dat{end}(:,begsel:endsel);<br> end<br> end<br> % concat signals<br> dat = cat(1,dat{:});<br><br></div><div>In
any case, as long as this is not corrected, people using fieldtrip to
read EGI MFF files should keep this in mind and order their channel
indexes!<br><br></div><div>Best,<br><br></div>Christian</div>