[FieldTrip] ft_freqgrandaverage: how ro deal with inconsistent numbers of channels in the TFR

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Thu Mar 2 10:32:07 CET 2023


Hi Niloofar,

Why do you want to use ft_freqgrandaverage if the channels don’t match up across patients?

Best wishes,
Jan-Mathijs

On 28 Feb 2023, at 17:37, Niloofar Tavakoli <niloofartavakoli1993 at gmail.com<mailto:niloofartavakoli1993 at gmail.com>> wrote:


Dear Fieldtrip community,



My name is Niloofar Tavakoli and I am a Ph.D. candidate at Kral Lab at Hannover Medical School, Germany. I am doing a Time-Frequency analysis on LFP data.Here is the data structure:

There are several penetration sites for each subject and each site includes 30 electrodes (originally 32 electrodes but now 30 after applying bipolar derivation).



I would like to exclude some of these electrodes in the TFR analysis. (some of these electrodes are non-responsive so I would not like to have them in the grand TFR).



As far as I understood, the only way for ft_freqgrandaverage to work is that the input data has the same number of channels(in this case electrodes), but that is not the case in my data.
Can you please let me know of a function in FieldTrip or maybe a trick how to cope with this?


Below you can find the code I tried to use

cfg = [];
tfr_grand=ft_freqgrandaverage(cfg,tfr_evoked_3935,tfr_evoked_4510)

and the data is also attached.( tfr_evoked_3935, tfr_evoked_4510) which are the two example TFRs for two different penetration sites
[https://urldefense.com/v3/__https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png__;!!HJOPV4FYYWzcc1jazlU!9VaVkcRsSUgwqh2ckb_ZY9_66Gvb2LW7wuODwP-H_be_hGPoHsrJu3GGqrFHwmmiy8WInBW1766kIXokOdSj8cWINMmZyKim1lmnIw$ ] tfr_evoked_3935.mat<https://urldefense.com/v3/__https://drive.google.com/file/d/1Rl6oA3bcp3B2Y9_BEJTzyUniq9NaBR4Q/view?usp=drive_web__;!!HJOPV4FYYWzcc1jazlU!4Js3YvORtgHgC4dfviuZre4xtkUykJsnn6FHjBiJYjk0zLzmt6qOn5Q834xqQvJBVx3NfJEYh_rGtQR_usQ7ClWgBdG2H18$>[X]
[https://urldefense.com/v3/__https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png__;!!HJOPV4FYYWzcc1jazlU!9VaVkcRsSUgwqh2ckb_ZY9_66Gvb2LW7wuODwP-H_be_hGPoHsrJu3GGqrFHwmmiy8WInBW1766kIXokOdSj8cWINMmZyKim1lmnIw$ ] tfr_evoked_4510.mat<https://urldefense.com/v3/__https://drive.google.com/file/d/16vt6h3tu5Zg1J-iOCKw2j8uxtwlrci1x/view?usp=drive_web__;!!HJOPV4FYYWzcc1jazlU!4Js3YvORtgHgC4dfviuZre4xtkUykJsnn6FHjBiJYjk0zLzmt6qOn5Q834xqQvJBVx3NfJEYh_rGtQR_usQ7ClWg17YRebE$>[X]


Any feedbacks and suggestions would be appreciated.

Kind Regards,











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


More information about the fieldtrip mailing list