[FieldTrip] Bad channel correction problems and ICA

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Fri Jun 7 11:47:11 CEST 2013


Hi Steve,

I'm not quite sure what you mean with getting nothing (nothing like, 
empty? or an error?) or not getting real ICA results (real in contrast 
to complex?). My hunge is that you need to take the rank of your data 
into account. Interpolating missing channels is done by combining 
already existing information, i.e. channels, to reconstruct a 
time-course at another spatial location, i.e. another channel. Since you 
do not add any new information by this (it's just a linear combination 
of your existing data matrix), you can leave that step out prior to 
doing ICA. Otherwise, you can set something like ica_cfg.XXXica.pca = 
rank(data.trial{1}), then afaik ft_componentanalysis will perform a PCA 
and essentially identify that the interpolated channels are a linear 
combination of other channels (ICA is then done of the PCA components). 
Both methods are equivalent, so you might as well just drop the 
interpolation and remove bad channels completely.

Best,
Jörn


On 6/7/2013 11:23 AM, Steve Johnston wrote:
> 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
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

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


More information about the fieldtrip mailing list