[FieldTrip] Interpolation and ft_channelrepair

Jörn M. Horschig jorn at artinis.com
Wed Oct 21 10:42:03 CEST 2015


Dear Grazia,

try adding cfg.sens = sens; before line 42. That will set the sensor definition so that ft_channelrepair knows the location of your channels, which is otherwise not obvious.

Best,
Jörn

--

Jörn M. Horschig, PhD, Software Engineer
Artinis Medical Systems  |  +31 481 350 980 

> -----Original Message-----
> From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-
> bounces at science.ru.nl] On Behalf Of Grazia Di Pisa
> Sent: Wednesday, October 21, 2015 10:30 AM
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] Interpolation and ft_channelrepair
> 
> 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)
> 
> 
> 
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip





More information about the fieldtrip mailing list