[FieldTrip] Poor Interpolation in ft_topoplotER?

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Thu May 27 13:35:29 CEST 2021


Apologies Christina et al,

I made a mistake in my earlier answer. The correct option to use for ft_selectdata should be cfg.select, rather than cfg.intersect.

Best wishes,
Jan-Mathijs


On 27 May 2021, at 13:33, Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>> wrote:

Dear Christina,

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.

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.

Something like this might work:

cohall2 = cell(size(cohall));

cfg = [];
cfg.intersect = ‘union’;
[cohall2{:}] = ft_selectdata(cfg, cohall{:});

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.

I am curious about an updated plot!

Best wishes,
JM



On 25 May 2021, at 21:09, Christina Vanden Bosch der Nederlanden <christinavb at gmail.com<mailto:christinavb at gmail.com>> wrote:



---------- Forwarded message ---------
From: Christina Vanden Bosch der Nederlanden <christinavb at gmail.com<mailto:christinavb at gmail.com>>
Date: Fri, May 21, 2021 at 3:46 PM
Subject: Poor Interpolation in ft_topoplotER?
To: <fieldtrip-request at science.ru.nl<mailto:fieldtrip-request at science.ru.nl>>


Dear FT,

I am trying to create a grand average topoplot for all my (infant) subjects's EGI sensor net phase coherence data. Code is below:

cfg = [];
cfg.parameter = 'cohspctrm';
cfg.appenddim = 'rpt';
cfg.channelcmb = cohall{1}.labelcmb %this is 128 x 2 list of 128 electrodes and 'Stimulus' pair
cohcomb = ft_appendfreq(cfg, cohall{:});


cfg=[];
cfg.avgoverrpt='yes';
cfg.frequency = [3 9];
avgcoh=ft_selectdata(cfg,cohcomb);
avgcoh = rmfield(avgcoh,'cfg'); %just to make plotting faster, take out all the old cfgs
cfg=[];
cfg.layout='GSN-HydroCel-128.sfp';
cfg.colorbar = 'yes';
cfg.parameter = 'cohspctrm';
cfg.refchannel = 'Stimulus';
figure;ft_topoplotER(cfg,avgcoh);

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?


<Screen Shot 2021-05-21 at 3.44.54 PM.png>

Thank you!

Christina

--
Christina M. Vanden Bosch der Nederlanden
Postdoctoral Fellow
Brain and Mind Institute
Western University
christinavb at gmail.com<mailto:christinavb at gmail.com>
Website: https://sites.google.com/view/christinavbdn<https://urldefense.com/v3/__https://sites.google.com/view/christinavbdn__;!!HJOPV4FYYWzcc1jazlU!usXzNu8LzfuG2IFvMLeEpTXK59dFuG0yquyihAgQTDkGoa3vOvVgTkvYoHRw5HcYcQKCE_k8$>
[https://mailfoogae.appspot.com/t?sender=aY2hyaXN0aW5hdmJAZ21haWwuY29t&type=zerocontent&guid=4b129037-b6d8-43f2-85d7-4ba7cff2fe43]ᐧ


--
Christina M. Vanden Bosch der Nederlanden
Postdoctoral Fellow
Brain and Mind Institute
Western University
christinavb at gmail.com<mailto:christinavb at gmail.com>
Website: https://sites.google.com/view/christinavbdn<https://urldefense.com/v3/__https://sites.google.com/view/christinavbdn__;!!HJOPV4FYYWzcc1jazlU!usXzNu8LzfuG2IFvMLeEpTXK59dFuG0yquyihAgQTDkGoa3vOvVgTkvYoHRw5HcYcQKCE_k8$>
[https://mailfoogae.appspot.com/t?sender=aY2hyaXN0aW5hdmJAZ21haWwuY29t&type=zerocontent&guid=571bf7b8-bb00-4993-ada8-47439ceae295]ᐧ
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!usXzNu8LzfuG2IFvMLeEpTXK59dFuG0yquyihAgQTDkGoa3vOvVgTkvYoHRw5HcYcUGiuANP$

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!on5DQL4zuo5ct49f-LNcA80JmEKPv2igW3F4iIX90lxx5tqu7JXkFkAGm9diMksU2yn0jgFy$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210527/a5084cfe/attachment.htm>


More information about the fieldtrip mailing list