<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear fters<div><br></div><div>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.</div><div><br></div><div>Specifically I'm struggling to get any real ICA results after using ft_channelrepair but not if I go through without it. </div><div><br></div><div>Data was recorded on a biosemi 128 system and the trials are just eye movements that I want to identify via ICA (simple test). </div><div><br></div><div>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).</div><div><br></div><div><span style="color: rgb(37, 153, 45); font-family: Courier; font-size: 12px; ">%%</span></div><div style="font-size: 12px; margin: 0px; font-family: Courier; color: rgb(37, 153, 45); ">% Standard cfg for import</div><div style="font-size: 12px; margin: 0px; font-family: Courier; color: rgb(37, 153, 45); min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg                         = [];</div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.prestim        = .2;</div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.poststim       = 2;</div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.eventtype      = <span style="color: rgb(178, 69, 243); ">'STATUS'</span>;</div><div style="font-size: 12px; margin: 0px; font-family: Courier; min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="font-size: 12px; margin: 0px; font-family: Courier; color: rgb(37, 153, 45); ">%%</div><div style="font-size: 12px; margin: 0px; font-family: Courier; color: rgb(37, 153, 45); ">%Load each dataset and examine for channels that are bad - starting with EOG Localiser.</div><div style="font-size: 12px; margin: 0px; font-family: Courier; color: rgb(37, 153, 45); min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.dataset                 = [subjectdata.dir filesep subjectdata.artifactfile];</div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.trialdef.eventvalue     = markers.artifact;</div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg                         = ft_definetrial(cfg);</div><div style="font-size: 12px; margin: 0px; font-family: Courier; min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">cfg.demean                  = <span style="color: rgb(178, 69, 243); ">'yes'</span>;</div><div style="font-size: 12px; margin: 0px; font-family: Courier; ">data                        = ft_preprocessing(cfg);</div><div style="font-size: 12px; margin: 0px; font-family: Courier; min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="font-size: 12px; margin: 0px; font-family: Courier; color: rgb(37, 153, 45); ">% After the above, run ChannelRepair after identifying bad channels.</div><div style="font-size: 12px; margin: 0px; font-family: Courier; min-height: 14px; "><div style="margin: 0px; color: rgb(37, 153, 45); ">%%</div><div style="margin: 0px; color: rgb(37, 153, 45); ">% Channel Replace - get nearest neighbours</div><div style="margin: 0px; ">cfg                      = [];</div><div style="margin: 0px; ">cfg.method               = <span style="color: rgb(178, 69, 243); ">'distance'</span></div><div style="margin: 0px; ">cfg.layout               = <span style="color: rgb(178, 69, 243); ">'biosemi128.lay'</span>;</div><div style="margin: 0px; ">cfg.neighbourdist        = 0.13;</div><div style="margin: 0px; ">[neighbours]             = ft_prepare_neighbours(cfg,data)</div><div style="margin: 0px; min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="margin: 0px; color: rgb(37, 153, 45); ">%% Interpolate and put into new data structure</div><div style="margin: 0px; ">cfg                      = [];</div><div style="margin: 0px; ">cfg.badchannel           = replace_channels;</div><div style="margin: 0px; ">cfg.layout               = <span style="color: rgb(178, 69, 243); ">'biosemi128.lay'</span>;</div><div style="margin: 0px; ">cfg.method               = <span style="color: rgb(178, 69, 243); ">'nearest'</span>;</div><div style="margin: 0px; ">cfg.neighbours           = neighbours;</div><div style="margin: 0px; ">cfg.neighbourdist        = 0.13;</div><div style="margin: 0px; ">artifact_cleandata       = ft_channelrepair(cfg,data)</div><div style="margin: 0px; "><br></div><div style="margin: 0px; "><div style="margin: 0px; color: rgb(37, 153, 45); ">% Visualise data for and mark uncorrectable artifacts.</div><div style="margin: 0px; ">cfg.viewmode                = <span style="color: rgb(178, 69, 243); ">'vertical'</span>;</div><div style="margin: 0px; ">cfg.continuous              = <span style="color: rgb(178, 69, 243); ">'yes'</span>;</div><div style="margin: 0px; ">cfg.blocksize               = 12;</div><div style="margin: 0px; ">cfg                         = ft_databrowser(cfg,artifact_cleandata)</div><div style="margin: 0px; min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="margin: 0px; color: rgb(37, 153, 45); ">%%</div><div style="margin: 0px; color: rgb(37, 153, 45); ">% Do artifact rejection (also redefine settings lost during re-cfg in artefact rejection) </div><div style="margin: 0px; ">cfg.trialdef.prestim        = .2;</div><div style="margin: 0px; ">cfg.trialdef.poststim       = 2;</div><div style="margin: 0px; ">cfg.trialdef.eventtype      = <span style="color: rgb(178, 69, 243); ">'STATUS'</span>;</div><div style="margin: 0px; ">cfg.artifact.reject         = <span style="color: rgb(178, 69, 243); ">'complete'</span>;</div><div style="margin: 0px; ">cfg.channel                 = <span style="color: rgb(178, 69, 243); ">'EEG'</span>;</div><div style="margin: 0px; ">cfg                         = ft_rejectartifact(cfg, artifact_cleandata);</div><div style="margin: 0px; ">trialdata                   = ft_preprocessing(cfg, artifact_cleandata);</div><div style="margin: 0px; min-height: 14px; "> <br class="webkit-block-placeholder"></div><div style="margin: 0px; color: rgb(37, 153, 45); ">%%</div><div style="margin: 0px; ">cfg                         = [];</div><div style="margin: 0px; ">comp                        = ft_componentanalysis(cfg, trialdata); </div><div style="margin: 0px; ">cfg                         = [];</div><div style="margin: 0px; ">cfg.component               = [1:20]</div><div style="margin: 0px; ">cfg.layout                  = <span style="color: rgb(178, 69, 243); ">'biosemi128.lay'</span></div><div style="margin: 0px; ">cfg.comment                 = <span style="color: rgb(178, 69, 243); ">'no'</span></div><div style="margin: 0px; ">ft_topoplotIC(cfg,comp)</div><div style="margin: 0px; min-height: 14px; "><br></div></div><div style="margin: 0px; ">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.</div><div style="margin: 0px; "><br></div><div style="margin: 0px; ">Thanks for any help</div><div style="margin: 0px; "><br></div><div style="margin: 0px; ">Steve </div></div></body></html>