[FieldTrip] Fieldtrip connectivity visualization

tibor.auer at gmail.com tibor.auer at gmail.com
Tue Sep 7 00:26:53 CEST 2021


Hi all,

 

Visualising connectivity in FieldTrip has been a lacking feature for me, as well.

 

In my developmental brach of aa <https://github.com/tiborauer/automaticanalysis/tree/meeg_connectivity> , I currently use a “modded” version of BrainNetViewer, which allows me to create some nice visualisations (see attached). 

 

Kind regards,

Tibor 

 

Auer, Tibor M.D. Ph.D.

Research Fellow

School of Psychology, Faculty of Health and Medical Sciences

University of Surrey, Guildford GU2 7XH

 <mailto:T.Auer at surrey.ac.uk> T.Auer at surrey.ac.uk

 <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FTiborAuer&data=04%7C01%7Ct.auer%40surrey.ac.uk%7C5f32dba325f5422f5c5a08d8becc029f%7C6b902693107440aa9e21d89446a2ebb5%7C0%7C0%7C637469131016806177%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wkpejqTmmo%2Fe4JA9QIaA6Z3%2BzipbFY%2FCEmRXC9UvKJs%3D&reserved=0> @TiborAuer

 

Feladó: fieldtrip <fieldtrip-bounces at science.ru.nl> E személy nevében: Schoffelen, J.M. (Jan Mathijs) via fieldtrip
Küldve: 30 August 2021 11:18
Címzett: FieldTrip discussion list <fieldtrip at science.ru.nl>
Másolatot kap: Schoffelen, J.M. (Jan Mathijs) <janmathijs.schoffelen at donders.ru.nl>
Tárgy: Re: [FieldTrip] Fieldtrip connectivity visualization

 

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$ <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/20210906/c2eb2773/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfc.jpg
Type: image/jpeg
Size: 385992 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210906/c2eb2773/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: conn.jpg
Type: image/jpeg
Size: 359220 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210906/c2eb2773/attachment-0003.jpg>


More information about the fieldtrip mailing list