<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Dear Christina,
<div class=""><br class="">
</div>
<div class="">It should somehow be possible to keep a representation (of NaNs) of the bad channels in the data. This needs to be implemented at the level of the actual rejection of the channels. In the subsequent analysis steps, once you average across subjects
 (ft_selectdata) you can add cfg.nanmean = ‘yes’, which will preserve in the average the sensors that don’t contain data for the full dataset. The consequence of cours is that the different sensor averages are created from different subsets of subjects, so
 it remains to be seen how swallowable the resulting image will look.</div>
<div class=""><br class="">
</div>
<div class="">Alternatively, you could start off from the data you have, and call ft_selectdata before calling ft_appendfreq, to inject the indvidual subject data with NaNs at the missing channels.</div>
<div class=""><br class="">
</div>
<div class="">Something like this might work:</div>
<div class=""><br class="">
</div>
<div class="">cohall2 = cell(size(cohall));</div>
<div class=""><br class="">
</div>
<div class="">cfg = [];</div>
<div class="">cfg.intersect = ‘union’;</div>
<div class="">[cohall2{:}] = ft_selectdata(cfg, cohall{:});</div>
<div class=""><br class="">
</div>
<div class="">Next, you should use cohall2 for the subsequent call to ft_appendfreq. It could be that the code is not fully robust when dealing with labelcmb, rather than label, but I assume you know how to work your way around that.</div>
<div class=""><br class="">
</div>
<div class="">I am curious about an updated plot!</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">JM</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 25 May 2021, at 21:09, Christina Vanden Bosch der Nederlanden <<a href="mailto:christinavb@gmail.com" class="">christinavb@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class=""><br class="">
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br class="">
From: <strong class="gmail_sendername" dir="auto">Christina Vanden Bosch der Nederlanden</strong>
<span dir="auto" class=""><<a href="mailto:christinavb@gmail.com" class="">christinavb@gmail.com</a>></span><br class="">
Date: Fri, May 21, 2021 at 3:46 PM<br class="">
Subject: Poor Interpolation in ft_topoplotER?<br class="">
To: <<a href="mailto:fieldtrip-request@science.ru.nl" class="">fieldtrip-request@science.ru.nl</a>><br class="">
</div>
<br class="">
<br class="">
<div dir="ltr" class="">Dear FT, 
<div class=""><br class="">
</div>
<div class="">I am trying to create a grand average topoplot for all my (infant) subjects's EGI sensor net phase coherence data. Code is below:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg = [];</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg.parameter = <span style="color:rgb(160,32,240)" class="">'cohspctrm'</span>;</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg.appenddim = <span style="color:rgb(160,32,240)" class="">'rpt'</span>;</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica; color: rgb(34, 139, 34);" class="">
<span style="" class="">cfg.channelcmb = cohall{1}.labelcmb %this is 128 x 2 list of 128 electrodes and 'Stimulus' pair</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cohcomb = ft_appendfreq(cfg, cohall{:});</div>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Helvetica;min-height:12px" class="">
<span class=""> </span><br class="webkit-block-placeholder">
</p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Helvetica;min-height:12px" class="">
<span class=""> </span><br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg=[];</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg.avgoverrpt=<span style="color:rgb(160,32,240)" class="">'yes'</span>;</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg.frequency = [3 9];</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
avgcoh=ft_selectdata(cfg,cohcomb);</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica; color: rgb(34, 139, 34);" class="">
<span style="" class="">avgcoh = rmfield(avgcoh,</span><span style="color:rgb(160,32,240)" class="">'cfg'</span><span style="" class="">);
</span>%just to make plotting faster, take out all the old cfgs</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg=[];</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica; color: rgb(160, 32, 240);" class="">
<span style="" class="">cfg.layout=</span>'GSN-HydroCel-128.sfp'<span style="" class="">;</span></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg.colorbar = <span style="color:rgb(160,32,240)" class="">'yes'</span>;</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg.parameter = <span style="color:rgb(160,32,240)" class="">'cohspctrm'</span>;</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
cfg.refchannel = <span style="color:rgb(160,32,240)" class="">'Stimulus'</span>;</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
figure;ft_topoplotER(cfg,avgcoh);</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal;" class="">
<font face="arial, sans-serif" class=""><br class="">
</font></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal;" class="">
<font face="arial, sans-serif" class="">This works, of course, but my average topoplot looks like below, with greatest coherence for areas where there are no electrodes consistently across participants. Is there something I can do to change the interpolation
 so FT doesn't include guesses about these missing electrodes?</font></div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
<br class="">
</div>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Helvetica" class="">
</p>
<span id="cid:ii_koyqfguv0"><Screen Shot 2021-05-21 at 3.44.54 PM.png></span>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Helvetica;" class="">
<br class="">
</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Helvetica;" class="">
Thank you!</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Helvetica;" class="">
<br class="">
</div>
<div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: Helvetica;" class="">
Christina</div>
<div class=""><br class="">
</div>
-- <br class="">
<div dir="ltr" data-smartmail="gmail_signature" class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">Christina M. Vanden Bosch der Nederlanden</div>
<div class="">Postdoctoral Fellow</div>
<div class="">Brain and Mind Institute</div>
<div class="">Western University<br class="">
<a href="mailto:christinavb@gmail.com" target="_blank" class="">christinavb@gmail.com</a></div>
<div class=""><span style="font-size:12.8px" class="">Website: </span><a href="https://urldefense.com/v3/__https://sites.google.com/view/christinavbdn__;!!HJOPV4FYYWzcc1jazlU!usXzNu8LzfuG2IFvMLeEpTXK59dFuG0yquyihAgQTDkGoa3vOvVgTkvYoHRw5HcYcQKCE_k8$" style="font-size:12.8px" target="_blank" class="">https://sites.google.com/view/christinavbdn</a><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div hspace="streak-pt-mark" style="max-height:1px" class=""><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aY2hyaXN0aW5hdmJAZ21haWwuY29t&type=zerocontent&guid=4b129037-b6d8-43f2-85d7-4ba7cff2fe43" class=""><font color="#ffffff" size="1" class="">ᐧ</font></div>
</div>
<br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div dir="ltr" class="">
<div class="">Christina M. Vanden Bosch der Nederlanden</div>
<div class="">Postdoctoral Fellow</div>
<div class="">Brain and Mind Institute</div>
<div class="">Western University<br class="">
<a href="mailto:christinavb@gmail.com" target="_blank" class="">christinavb@gmail.com</a></div>
<div class=""><span style="font-size:12.8px" class="">Website: </span><a href="https://urldefense.com/v3/__https://sites.google.com/view/christinavbdn__;!!HJOPV4FYYWzcc1jazlU!usXzNu8LzfuG2IFvMLeEpTXK59dFuG0yquyihAgQTDkGoa3vOvVgTkvYoHRw5HcYcQKCE_k8$" style="font-size:12.8px" target="_blank" class="">https://sites.google.com/view/christinavbdn</a><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div hspace="streak-pt-mark" style="max-height:1px" class=""><img alt="" style="width:0px;max-height:0px;overflow:hidden" src="https://mailfoogae.appspot.com/t?sender=aY2hyaXN0aW5hdmJAZ21haWwuY29t&type=zerocontent&guid=571bf7b8-bb00-4993-ada8-47439ceae295" class=""><font color="#ffffff" size="1" class="">ᐧ</font></div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!usXzNu8LzfuG2IFvMLeEpTXK59dFuG0yquyihAgQTDkGoa3vOvVgTkvYoHRw5HcYcUGiuANP$
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>