[FieldTrip] Bad channel correction problems and ICA

Steve Johnston S.J.Johnston at swansea.ac.uk
Fri Jun 7 11:23:20 CEST 2013


Dear fters

I've just started using ft and, although being able to run through a test run of eye movement data just fine, I'm now getting into the more detailed stuff and I'm hitting a snag that I hope you can help me with.

Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. 

Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). 

If I just run through the procedure of importing data, set markers, remove gross artifacts (keeping all channels, including 3 bad ones) and then run the ICA - I get lovely eye movement components appearing. However, now I want to do it 'properly' and replace the bad channels. Currently I do the following … (sorry, for completeness I included everything to be on the safe side).

%%
% Standard cfg for import
 
cfg                         = [];
cfg.trialdef.prestim        = .2;
cfg.trialdef.poststim       = 2;
cfg.trialdef.eventtype      = 'STATUS';
 
%%
%Load each dataset and examine for channels that are bad - starting with EOG Localiser.
 
cfg.dataset                 = [subjectdata.dir filesep subjectdata.artifactfile];
cfg.trialdef.eventvalue     = markers.artifact;
cfg                         = ft_definetrial(cfg);
 
cfg.demean                  = 'yes';
data                        = ft_preprocessing(cfg);
 
% After the above, run ChannelRepair after identifying bad channels.
%%
% Channel Replace - get nearest neighbours
cfg                      = [];
cfg.method               = 'distance'
cfg.layout               = 'biosemi128.lay';
cfg.neighbourdist        = 0.13;
[neighbours]             = ft_prepare_neighbours(cfg,data)
 
%% Interpolate and put into new data structure
cfg                      = [];
cfg.badchannel           = replace_channels;
cfg.layout               = 'biosemi128.lay';
cfg.method               = 'nearest';
cfg.neighbours           = neighbours;
cfg.neighbourdist        = 0.13;
artifact_cleandata       = ft_channelrepair(cfg,data)

% Visualise data for and mark uncorrectable artifacts.
cfg.viewmode                = 'vertical';
cfg.continuous              = 'yes';
cfg.blocksize               = 12;
cfg                         = ft_databrowser(cfg,artifact_cleandata)
 
%%
% Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) 
cfg.trialdef.prestim        = .2;
cfg.trialdef.poststim       = 2;
cfg.trialdef.eventtype      = 'STATUS';
cfg.artifact.reject         = 'complete';
cfg.channel                 = 'EEG';
cfg                         = ft_rejectartifact(cfg, artifact_cleandata);
trialdata                   = ft_preprocessing(cfg, artifact_cleandata);
 
%%
cfg                         = [];
comp                        = ft_componentanalysis(cfg, trialdata); 
cfg                         = [];
cfg.component               = [1:20]
cfg.layout                  = 'biosemi128.lay'
cfg.comment                 = 'no'
ft_topoplotIC(cfg,comp)

So, the big question is - why do I get nothing after doing the channel repair. I've been through it several times and that seems to be the step where everything goes wrong. I've looked at the data post re-interpolation and it looks good - for now I'm assuming I've missed something.

Thanks for any help

Steve 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130607/21b376d0/attachment-0001.html>


More information about the fieldtrip mailing list