[FieldTrip] Interpolation and ft_channelrepair

Grazia Di Pisa g.dipisa at gmail.com
Wed Oct 21 10:30:07 CEST 2015


Dear all,

I’m trying to do interpolation to repair some bad channels, but I’m getting the error below.
I've read the ft_fetch_sens help but I don’t understand how I should specify the electrodes.

Is there a file I should upload or am I missing something in my code? 
Any help or hint is very much appreciated!

thanks in advance,
~ grazia


//
Error using ft_fetch_sens (line 183)
no electrodes or gradiometers specified.

Error in ft_channelrepair (line 115)
 sens = ft_fetch_sens(cfg, data);

Error in new_analyse_GDP (line 42)
ft_channelrepair(cfg, data)
//

This is my code:

15 	cfg = [];
16 	cfg_neighb       	= [];
17	cfg_neighb.method	= 'triangulation'; 
18    cfg.senstype      	= 'EEG';
19    cfg_neighb.layout 	= 'biosemi64.lay';
20    neighbours        	= ft_prepare_neighbours(cfg_neighb);
21    
22    cfg.neighbours    	= neighbours;
23    cfg.channel       	= {'Fp1', 'Fp2', 'AF7', 'AF3','AF8','F7','F5','FT9',}; 
24    cfg.feedback     	 = 'yes';
25    cfg.layout 		= 'biosemi64.lay';
26    lay 				= ft_prepare_layout(cfg);
27    
28    sens 			= data;
29    sens.type 		= 'eeg';
30    sens.label		= lay.label;
31    sens.chanpos 		= lay.pos;
32    sens.chanpos(:,3) 	= 0;
33  
34   ft_neighbourplot(cfg, data)
35 
36    cfg 				= [];
37    cfg.method         	= 'nearest';
38    cfg.badchannel     	= {'Fp1', 'Fp2', 'AF7', 'AF3','AF8','F7','F5','FT9'};
39    cfg.neighbours    	 = neighbours;
40    cfg.trials        		 = 'all';
41     
42    ft_channelrepair(cfg, data)








More information about the fieldtrip mailing list