[FieldTrip] channel repair script

Dmitri Filimonov dmitri89 at ut.ee
Tue Sep 18 10:00:35 CEST 2012


Dear Sir/Madam,

My name is Dmitri Filimonov, I am a master student in University of Tartu
(Estonia), using fieldtrip for EEG data analysis. I would like to ask some
assistance with fieldtrip script.
The task is to repair some EEG channels, so need to use ft_channelrepair.
And I tried to do that after artifact rejection, so I could first see,
which channels are noisy or disabled. I tried multiple combinations, yet
there are still problems with the script.
It looks like:

>> channels_to_repair={'Fp1', 'Fp2'};
layout_file=('C:\ fieldtrip-20120703\template\layout\EEG1010.lay');

cfg=[];
cfg.layout = 'EEG1010.lay';
data.elec = ft_prepare_layout(cfg);
neighbours = ft_prepare_neighbours(cfg, good_data)
cfg = ft_checkconfig(cfg, 'required', {'method'});
cfg.method = 'distance';  (or ‘nearest’)
cfg.badchannel=channels_to_repair;
cfg.neighbours = ft_prepare_neighbours (cfg, good_data);
G_data = ft_channelrepair(cfg, dood_data);
(Good_data –is a processed and filtered data, yet containing channels,
which have to be repaired.)
After processing the program gives me several errors:

reading layout from file EEG1010.lay
the call to "ft_prepare_layout" took 0 seconds and an estimated NaN MB
??? Error using ==> ft_checkconfig at 151
The field cfg.method is required
Error in ==> ft_prepare_neighbours at 77
cfg = ft_checkconfig(cfg, 'required', {'method'});

Other combinations emerge similar errors, or

Error in ==> ft_neighbourselection at 30
neighbours = ft_prepare_neighbours(varargin{:});

Can you give me some help, what kind of ‘method’ exactly program wants me
to mention (type)?

Yours sincerely,
Dmitri






More information about the fieldtrip mailing list