[FieldTrip] Channel interpolation error

Raphaël Thézé raphael.theze at gmail.com
Fri May 3 17:17:18 CEST 2019


Hi Iris,

Have your tried to put in your cfg for ft_channelrepair:
cfg.elec = ft_read_sens( 'acticap-64ch-standard2.mat');

If that does not work, maybe your electrode file is the problem.

Cheers,
Raphaël


Le ven. 3 mai 2019 à 16:35, MILÁN MAILLO, IRIS <iris.milan at upf.edu> a
écrit :

> Hi everyone,
> I am trying to interpolate some noisy channels but I keep getting an error
> I am not able to solve. Here is my code:
>
> %prepare neighbours
> cfg = [];
> cfg.method = 'distance';
> cfg.channel = 'all';
> cfg.layout = 'acticap-64ch-standard2.mat';
> cfg.feedback ='yes';
> neighbours = ft_prepare_neighbours(cfg, data_ica_cleaned);
>
> % interpolate noisy channels
> cfg = [];
> cfg.badchannel     = {'F8','FT9','FT7'};
> cfg.method         = 'weighted';
> cfg.neighbours     = neighbours;
> cfg.elecfile = 'acticap-64ch-standard2.mat';
> interpolated_data = ft_channelrepair(cfg,data_ica_cleaned);
>
> And the error I get is this:
>
> Undefined function or variable 'lab'.
> Error in channelposition (line 331)
> n = size(lab,2);
> Error in ft_datatype_sens (line 350)
>         [chanpos, chanori, lab] = channelposition(sens);
> Error in ft_datatype_sens (line 158)
>     sens = ft_datatype_sens(sens, 'version', '2011v2');
> Error in ft_read_sens (line 475)
> sens = ft_datatype_sens(sens);
> Error in ft_fetch_sens (line 150)
>   sens = ft_read_sens(cfg.elecfile);
> Error in ft_channelrepair (line 129)
>     sens = ft_fetch_sens(cfg, data);
>
>
> I don't know if I'm getting this error because I haven't defined the
> structure for EEG channels (sens.label, sens.chanpos, sens.elecpos,
> sens.tra), but I haven't done it because I'm not really sure of how to do
> it.
>
> Could anyone help me?
> Thanks a million!!
>
> *Iris Milán Maillo*
>
> PhD Student
> Speech Production and Bilingualism (SPB) <https://www.upf.edu/web/spb>
> Center for Brain and Cognition (CBC) <http://cbc.upf.edu/cbc.upf.edu/>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190503/640e7b06/attachment-0002.html>
-------------- next part --------------
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202


More information about the fieldtrip mailing list