[FieldTrip] Using ft_virtualchannel with cfg.method = 'none'
Marisa Monika Amalie Birk
marisa.birk at unitn.it
Mon Feb 17 15:53:49 CET 2025
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%7Ce0fe659ef5b84dd9d38008dd4f62ec13%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638754008476929036%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=xhR%2F93susAM1%2FjnvoKxysAv6Etjl0gfjUFiCPEmajP0%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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250217/6c474e2b/attachment.htm>
More information about the fieldtrip
mailing list