[FieldTrip] Repair missing channel

Diepeveen, Mary-Jo Mary-Jo.Diepeveen at mpi.nl
Thu Feb 11 11:23:17 CET 2016


Hello,

During artifact rejection (in summary mode), I had to remove the F7 channel for some of my subjects. I'm now trying to replace these missing channels but I'm having some difficulties.
Since I only have 28 channels (excl. eye and reference) and F7 is all the way on the front left, I thought using the average method would be the best. After some trial and errors, I now have this:
cfg             = [];
cfg.method      = 'template';
cfg.template    = 'custom_easycap32.mat';
cfg.channel     = {'F7'};
neighbours    = ft_prepare_neighbours(cfg, data_nat_clean)
cfg             = [];
cfg.method      = 'average';
cfg.layout      = 'custom_easycap32.mat';
cfg.missingchannel = ft_channelselection('F7', data_nat_clean.label);
cfg.neighbours  = neighbours;
data_nat_chan   = ft_channelrepair(cfg, data_nat_clean)

If I run this code, I get the following which I think is due to an error in the first part:
Trying to load sensor neighbours from a template
Successfully loaded neighbour structure from custom_easycap32.mat
Improper index matrix reference.

Error in ft_prepare_neighbours (line 219)
neighb_chans = {neighbours(:).label};

What does this error mean and how can I fix this? I have also tried some things without the first part, but then either it said that everything worked at the resulting data still had 27 channels (so without the F7) or I got an error saying there is a reference to non-existing field 'neighbours' .

I hope someone can help me out!

Thanks,
Mary-Jo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160211/ce7e1327/attachment.html>


More information about the fieldtrip mailing list