[FieldTrip] Using ft_virtualchannel with cfg.method = 'none'
Marisa Monika Amalie Birk
marisa.birk at unitn.it
Wed Feb 19 15:26:27 CET 2025
Hi Jan-Mathijs,
Thank you for your reply. I tried using different atlases (HCP52 with 360
parcels, Schaefer400 with 400 parcels), but I’m still seeing a high
variation in the number of sources per parcel. I was planning to perform a
sort of semi-searchlight by chunking the data into parcels based on an
anatomical atlas and using those parcels as input for the spatial
searchlight. However, this isn’t really possible with such a high variation
in sources per parcel.
Instead, do you think it would work to manually define the neighboring
dipoles (e.g., identifying the direct neighbors for each dipole) instead of
using parcels for the searchlight?
Thank you very much!
Marisa
Il giorno mar 18 feb 2025 alle ore 13:58 Schoffelen, J.M. (Jan Mathijs) via
fieldtrip <fieldtrip at science.ru.nl> ha scritto:
> Hi Marisa,
>
> I don’t think that this is due to an error on your end. It’s just due to
> the fact that the (interpolated, but also the original) atlas of your
> choice has a wide wide range of parcel sizes.
>
> Best wishes,
> Jan-Mathijs
>
> On 17 Feb 2025, at 15:53, Marisa Monika Amalie Birk via fieldtrip <
> fieldtrip at science.ru.nl> wrote:
>
> Dear Fieldtrippers,
>
> I am currently doing source reconstructing for MEG data and I’ve run into
> an issue I’m hoping someone can help with.
>
> Specifically, I am using the ft_virtualchannel function, but with
> cfg.method = 'none', so that the components of the virtual channels are not
> combined. For further analysis I need the sources to remain separated per
> parcel.
>
> I closely followed the scripts from Mikkel Vinding and Robert Oostenveld
> <https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmcvinding%2Fwarpimg%2Fblob%2Fmain%2Fbenchmarking%2Fsource_c_virtualchan.m&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C84276ac2aee147f9fd5e08dd50f16fb8%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638755720529719593%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=1Rc5Xbp%2BgZ46cQe3paomey5aJLx3gagTN2hK%2BOCyEzc%3D&reserved=0>:
> I created the spatial filters using the LCMV beamformer and interpolated
> the AAL atlas onto the sourcemodel, then used the ft_virtualchannel
> function.
>
> The problem is that I'm seeing a highly uneven number of virtual channels
> per parcel. For example, Heschl_L has only 25 channels, while Frontal_Mid_R
> has 651. In total, the mean number of virtual channels per parcel is 200,
> but the standard deviation is 146. This seems quite strange to me, as I
> would expect the ROIs to be more comparable in size.
>
> Is this expected behavior? Or have I made an error somewhere in the
> process?
>
>
> My code is as follows:
>
> %% Interpolate Atlas
> load(fullfile(ftpath, '/template/sourcemodel/standard_sourcemodel3d4mm'));
> atlas = ft_read_atlas([ftpath filesep
> 'template/atlas/aal/ROI_MNI_V4.nii']);
>
> cfg = [];
> cfg.interpmethod = 'nearest'; % Or another interpolation method if needed
> cfg.parameter = 'tissue'; % or other relevant parameters based on the
> atlas
> sourcemodel_atlas = ft_sourceinterpolate(cfg, atlas, sourcemodel);
> sourcemodel_atlas.tissuelabel = atlas.tissuelabel;
>
> atlas_grid = ft_checkdata(sourcemodel_atlas, 'datatype', 'source');
> atlas_grid.inside = sourcemodel.inside;
>
> %% Create Common Filters using LCMV beamformer
> cfg = [];
> cfg.method = 'lcmv';
> cfg.channel = 'meg';
> cfg.lcmv.keepfilter = 'yes';
> cfg.lcmv.fixedori = 'yes';
> cfg.lcmv.lambda = '5%';
> cfg.lcmv.kappa = kappa;
> cfg.lcmv.projectmom = 'yes';
> cfg.headmodel = headmodel;
> cfg.sourcemodel = grid; %leadfield
> commonfilter_sub = ft_sourceanalysis(cfg, tlckw); %tlckw is
> time-locked data
>
> %% add atlas to Filter
> commonfilter_sub.tissue = atlas_grid.tissue;
> commonfilter_sub.tissuelabel = atlas_grid.tissuelabel;
>
> % Create virtual channels
> cfg = [];
> cfg.parcellation = 'tissue';
> cfg.method = 'none';
> virtualData = ft_virtualchannel(cfg, data_av, commonfilter_sub); % data_av
> is averaged data over trials
>
>
> Thanks in advance for your help!
> Marisa Birk
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C84276ac2aee147f9fd5e08dd50f16fb8%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638755720529770002%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=%2FmkbVPP2gJ2KoBrZMD2FdWRwIMmj2WHAoIK1y0O%2FKSU%3D&reserved=0
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C84276ac2aee147f9fd5e08dd50f16fb8%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638755720529798153%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=65ha8bPiL962gHdRcEgBRajPx6rW19mzyjpXQAXY%2F78%3D&reserved=0
>
>
> _______________________________________________
> fieldtrip mailing list
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C84276ac2aee147f9fd5e08dd50f16fb8%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638755720529831941%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=3KVrIqXvCpJYedKqkOq4HZE490TFg%2BTQ2sZQ4330ouk%3D&reserved=0
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C84276ac2aee147f9fd5e08dd50f16fb8%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638755720529853328%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C80000%7C%7C%7C&sdata=MPbugWUjZiU3vPTb%2Be%2FOIJ4tD0vEEZdolOeH5G7n5IQ%3D&reserved=0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250219/ee5f5c55/attachment.htm>
More information about the fieldtrip
mailing list