<div dir="ltr">Dear Eelke,<div><br></div><div>ok, so i installed an older version of matlab (which also solved some other problems with fieldtrip) and now it works. However I am running into another problem with it. Maybe you can help too:</div>
<div>If I try to run the ICA after the bad channel replacement it takes hours and wchange just does not get lower. In my naive thinking I thought that might be due to the fact that the replaced channels are recognized as interpolations of the others??? But what could I do otherwise?: I thought about doing the bcr later, but that means that my ica suffers from all the electrode jumps from my bad channels. or I just exclude them from the ica - but how to proceed then: apply the reject component function on the data without the channels and then replace them? sorry, I am just a bit lost. The weirdest thing is: if I replace the channels with the help of another software before even processing the data, the ica works perfectly later in fieldtrip. WHY????</div>
<div>Would be wonderful if you could give me another hand... Thanks so much in advance!!!</div><div>Katrin </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-18 10:18 GMT+02:00 Eelke Spaak <span dir="ltr"><<a href="mailto:eelke.spaak@donders.ru.nl" target="_blank">eelke.spaak@donders.ru.nl</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Katrin,<br>
<br>
When I look at the data you've shown me, in fact I do see an effect of<br>
ft_channelrepair. I run your code:<br>
<br>
load ('ERP_Francesca17obs90_clean.mat')<br>
<div class=""><br>
%% Preparing neighbours for channel repair<br>
<br>
cfg_neighb = [];<br>
cfg_neighb.feedback = 'yes';<br>
cfg_neighb.method = 'triangulation';<br>
cfg_neighb.layout = 'GSN-HydroCel-129.sfp';<br>
</div>neighbours = ft_prepare_neighbours(cfg_neighb, obs90_data_clean2);<br>
<div class=""><br>
% Interpolate and put into new data structure<br>
cfg = [];<br>
</div>cfg.badchannel = {'E49', 'E68'};<br>
<div class="">cfg.layout = 'GSN-HydroCel-129.sfp';<br>
cfg.method = 'nearest';<br>
cfg.neighbours = neighbours;<br>
</div>obs90_data_channelrepaired = ft_channelrepair(cfg,obs90_data_clean2);<br>
<br>
followed by:<br>
<br>
dat1=obs90_data_clean2;<br>
dat2=obs90_data_channelrepaired;<br>
<br>
x=dat1.trial{1}(68,:); % 68 is channel index of E68<br>
y=dat2.trial{1}(68,:);<br>
plot(x);hold on;plot(y,'r');<br>
<br>
x=dat1.trial{1}(49,:);<br>
y=dat2.trial{1}(49,:);<br>
figure;<br>
plot(x);hold on;plot(y,'r')<br>
<br>
and the two figures that come up are shown in the attachments. The<br>
original (blue) and channel-repaired (red) traces are clearly<br>
different. These plots are for trial 1, but the same result holds when<br>
I plot a different trial.<br>
<br>
Does it work on your end too now?<br>
<br>
Best,<br>
Eelke<br>
<div class="HOEnZb"><div class="h5"><br>
On 14 August 2014 08:57, Eelke Spaak <<a href="mailto:eelke.spaak@donders.ru.nl">eelke.spaak@donders.ru.nl</a>> wrote:<br>
> OK just checking :) In that case, could you post a small snippet of<br>
> data and the actual cfg you used (including which channels to repair)<br>
> on e.g. dropbox or so? Then I can have a look.<br>
><br>
> Best,<br>
> Eelke<br>
><br>
> On 13 August 2014 22:12, KatrinH Heimann <<a href="mailto:katrinheimann@gmail.com">katrinheimann@gmail.com</a>> wrote:<br>
>> Dear Eelke, yes, sure, sorry, I did that. No effect.<br>
>><br>
>><br>
>> 2014-08-13 21:55 GMT+02:00 Eelke Spaak <<a href="mailto:eelke.spaak@donders.ru.nl">eelke.spaak@donders.ru.nl</a>>:<br>
>><br>
>>> Dear Katrin,<br>
>>><br>
>>> Have you tried putting the labels of the channels you want interpolated<br>
>>> into the cfg.badchannel array?<br>
>>><br>
>>> Best,<br>
>>> Eelke<br>
>>><br>
>>> Op 13 aug. 2014 19:24 schreef "KatrinH Heimann" <<a href="mailto:katrinheimann@gmail.com">katrinheimann@gmail.com</a>>:<br>
>>>><br>
>>>> Dear all. I am trying to replace bad channels.<br>
>>>> This is my code (very basic I think):%% Preparing neighbours for channel<br>
>>>> repair<br>
>>>><br>
>>>><br>
>>>><br>
>>>> cfg_neighb          = [];<br>
>>>><br>
>>>> cfg_neighb.feedback = 'yes';<br>
>>>><br>
>>>> cfg_neighb.method   = 'triangulation';<br>
>>>><br>
>>>> cfg_neighb.layout   = 'GSN-HydroCel-129.sfp';<br>
>>>><br>
>>>> neighbours          = ft_prepare_neighbours(cfg_neighb, obs_data);<br>
>>>><br>
>>>><br>
>>>><br>
>>>> % Interpolate and put into new data structure<br>
>>>><br>
>>>>  cfg                      = [];<br>
>>>><br>
>>>>  cfg.badchannel           = {};<br>
>>>><br>
>>>>  cfg.layout               = 'GSN-HydroCel-129.sfp';<br>
>>>><br>
>>>>  cfg.method               = 'nearest';<br>
>>>><br>
>>>>  cfg.neighbours           = neighbours;<br>
>>>><br>
>>>>  obs_data_channelrepaired       = ft_channelrepair(cfg,obs_data)<br>
>>>><br>
>>>><br>
>>>> I do not get any error but fieldtrip even tells me that the interpolation<br>
>>>> worked. However I do not see ANY trace of it in my data when inspecting it<br>
>>>> afterwards. I also tried to change the method (to average) - no change.<br>
>>>> Anybody who can help me with that?<br>
>>>> Thanks a million<br>
>>>> Katrin<br>
>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> fieldtrip mailing list<br>
>>>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
>>>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> fieldtrip mailing list<br>
>>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
>>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> fieldtrip mailing list<br>
>> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
>> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>