[FieldTrip] Removing channels from processed data
jan-mathijs schoffelen
jan.schoffelen at donders.ru.nl
Fri Apr 6 20:50:11 CEST 2012
Dear Matt,
It seems you have stumbled on some code that is still a bit under development, and apparently not really stable.
ft_selectdata should be able to do the trick for you, but I suspect a bug in ft_selectdata_new, so I'd try ft_selectdata_old instead.
To achieve this, you need to do something like this:
selchan = ft_channelselection({'all' '-E59'}, data.label);
data = ft_selectdata(data, 'channel', selchan); % notice the function's input now with key-value pairs, rather than a cfg.
We hope to find some time to improve the ft_selectdata_new soon. For the time being, could you file a bug on this issue on our bugzilla website? (www.bugzilla.fcdonders.nl)
Cheers,
JM
On Apr 6, 2012, at 8:05 PM, Matt Mollison wrote:
> Dear FieldTrippers,
>
> I'm using fieldtrip-20120405. I'm trying to remove a "bad" channel from a subject's processed data (output of ft_timelockanalysis and ft_freqanalysis). I've found the function ft_selectdata (which runs ft_selectdata_new), but when I define my cfg to remove the bad channel (cfg.channels={'all','-E59'}) and use the function, it also removes the dimord field which subsequent ft_* functions need (e.g., ft_multiplotER, ft_timelockgrandaverage).
>
> I could manually remove the channel, but I was hoping for a ft_* function that would modify the label field automatically. Manually replacing the channel with NaNs does not seem to be a solution because when I use ft_singleplotER to plot data from a ROI (i.e., multiple channels in a region) that includes this now-all-NaNs channel, nothing gets plotted (meaning a mean, and not a nanmean, function gets used to average over the ROI), so I fear the same thing will happen with other functions (e.g., ft_timelockstatistics). I also know I can use ft_rejectvisual early on in my processing, but I don't want to re-process my data (and I'm not currently using FT for artifact detection).
>
> So my question is: what's the best FieldTrip function-based way to remove a channel?
>
> Thanks,
> Matt
>
> --
> Univ. of Colorado at Boulder
> Dept. of Psychology and Neuroscience
> matthew.mollison at colorado.edu
> http://psych.colorado.edu/~mollison/
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
Jan-Mathijs Schoffelen, MD PhD
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120406/7b1c166a/attachment-0002.html>
More information about the fieldtrip
mailing list