[FieldTrip] ft_channelrepair with eeg data
Marshall, T.R. (Tom)
t.marshall at fcdonders.ru.nl
Fri Jul 8 16:17:12 CEST 2011
Thanks Stephen. ft_neighbourselection looks like it might be what I need.
So now I tried this:-
###
channels_to_repair={'FT9', 'CPz'};
layout_file=('H:\common\matlab\fieldtrip\template\layout\EEG1010.lay');
cfg=[];
cfg.layout=layout_file;
cfg.badchannel=channels_to_repair;
cfg.neighbours = ft_neighbourselection(cfg, data);
data=ft_channelrepair(cfg, data);
###
But what that gave me was:-
###
??? Reference to non-existent field 'elec'.
Error in ==> ft_channelrepair at 92
sens = data.elec;
###
This is the field that my eeg data don't have, that I mentioned in my first post. What is this data.elec structure supposed to contain/look like, and does a function exist that will create it for me?
Best,
Tom
----- Original Message -----
From: "Stephen Whitmarsh" <stephen.whitmarsh at gmail.com>
To: "Email discussion list for the FieldTrip project" <fieldtrip at donders.ru.nl>
Sent: Friday, 8 July, 2011 3:44:44 PM
Subject: Re: [FieldTrip] ft_channelrepair with eeg data
He Tom,
Wow, look what was made this morning by Jorn at basecamp:
http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors
Cheers,
Stephen (Pte(T))
On 8 July 2011 15:28, Marshall, T.R. (Tom) <t.marshall at fcdonders.ru.nl> wrote:
>
> 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
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
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