[FieldTrip] ft_channelrepair with eeg data

Marshall, T.R. (Tom) t.marshall at fcdonders.ru.nl
Fri Jul 8 15:28:47 CEST 2011


Hi Fieldtrip-warriors,

I'm trying to use function ft_channelrepair to remove and reinterpolate some bad channels in my eeg data. My syntax looks like this:-

###

   channels_to_repair={'FT9', 'CPz'};

   cfg=[];
   cfg.neighbourdist = 4;
   cfg.badchannel=channels_to_repair;

   data=ft_channelrepair(cfg, data);

###

Running this produces the following error msg:

###

   ??? Error using ==> ft_checkconfig at 157
   The field cfg.neighbours is required


   Error in ==> ft_channelrepair at 58
   cfg = ft_checkconfig(cfg, 'required', {'neighbours'});

###

It seems that the underlying function ft_checkconfig requires a field 'cfg.neighbours' that ft_channelrepair does not. But... what value should be specified here?

I also see the following in the help file for ft_channelrepair:-

###

     Since a nearest neighbour average is used, the input should contain
     a gradiometer or electrode definition, i.e. data.grad or data.elec.

###

What exactly is this 'electrode definition'? A layout file for the electrodes? Are there prespecified templates or should I supply my own, and is there a function to correctly add this field to the data structure?

I'm using a standard 10-10 64-electrode layout.

Best,

-- 
Tom Marshall, MSc.
Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging
tel: +31(0)243668487
email: t.marshall at fcdonders.ru.nl
postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands
visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands



More information about the fieldtrip mailing list