[FieldTrip] Fieldtrip connectivity visualization

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Mon Aug 30 12:17:36 CEST 2021


Hi Philip,

I think your particular use case hit a snag in the code. I will address this in a fix soon, but for you in order to get what you want (i.e. a line plot as function of frequency), you’d need to run ft_freqanalysis with ‘mtmfft’ as method, and a pre-selected latency window (i.e. use ft_selectdata on the longer data segments prior to passing the data to ft_freqanalysis and ft_connectivityanalysis).

Best wishes,

Jan-Mathijs


Begin forwarded message:


Hi Dr. Schoffelen,

We have some interesting results from the MOUS dataset and would like to continue by looking at connectivity between some ROIs that we have. In particular, we're interested in using one ROI as a seed and looking how connectivity with other ROIs changes over time after the stimulus.

As a first step, I'm attempting to analyze connectivity between sensors, but I seem to be having some trouble with the last visualization step, which may just indicate a problem with an earlier step. For a single subject, I first ran a time-frequency analysis with the following settings:

cfg_subTFR = [];
cfg_subTFR.output       = 'powandcsd';
cfg_subTFR.channel      = 'MEG';
cfg_subTFR.method       = 'mtmconvol';
cfg_subTFR.taper        = 'hanning';
cfg_subTFR.foi          = 2:1:30;
cfg_subTFR.t_ftimwin    = 4./cfg_subTFR.foi;  % 4 cycles per time window
cfg_subTFR.toi          = -0.5:0.05:0.6;
TFR_firstWords = ft_freqanalysis(cfg_subTFR, data_clean);

Results seemed to look logical, so I then ran coherence using ft_connectivityanalysis. The output includes a crsspctrm of size 36585x29x23 , with 36585 corresponding to the pairs of sensors, 29 being the frequencies, and 23 being the timepoints of interest. Finally, to visualize the results, I selected a pair of sensors and ran ft_connectivityplot. However, instead of getting the lineplots shown in the tutorial (https://www.fieldtriptoolbox.org/tutorial/connectivity/<https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/tutorial/connectivity/__;!!HJOPV4FYYWzcc1jazlU!ouVC5PWLvy92UOJiA59mTe8m8TQ0HRmiP9rScPYJFDg7-b0k2ctLZW70YHF0VyMMcwt3vfQ$>), I seem to be getting a heatmap, similar to a visualization of TFR (attached below). Even if I limit it to one frequency time bin, I seem to be getting this view. Is there a problem with how my data/results are structured prior to visualizing? Please let me know. Thank you!

Best,
Philip

<image.png>

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

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


More information about the fieldtrip mailing list