[FieldTrip] Beamforming resting state MEG results in highly correlated time series at sEEG contact locations along the same electrode
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Thu Sep 18 16:29:37 CEST 2025
Hi Caila,
I had a quick look at your code (+figures), and I don’t think that there is anything wrong with your pipeline as such.
That is, I assume that all went well with segmentation/coregistration/forward model computation such that the computed forward models are ‘valid’.
All in all, given that the spatial resolution of beamformers is not whopping in general (i.e. specifically when you have resting state data there’s probably no sufficiently high SNR localized signal components that yield very distinctive short epoch time courses of reconstructed signal), it’s not really surprising that the reconstructed time courses at locations ‘along a line’ look very much like one another, particularly if displayed on such short timescales. Note, that the occasional polarity flip is due to the ambiguity of the orientation of the dimensionality reduction (orientation estimation) heuristic.
In general, if you would allow me to make some recommendations on some details in your pipeline:
- I would NOT recommend cfg.rawtrial as an option in ft_sourceanalysis. Rather, I’d use cfg.keepfilter = ‘yes’, and use as an input a datastructure with just a single covariance matrix. This covariance matrix can be obtained from epoched data (i.e. after passing the continuous data through ft_redefinetrial, and where indeed you may want to ‘equate’ the time axis of each individual sub-epoch to avoid memory issues), where the cfg into ft_timelockanalysis specified cfg.keeptrials = ’no’. As a side note, the covariance matrix obtained as an average (of single-epoch covariances) across redefined epochs should be more or less equivalent to the covariance matrix of the continuous (highpassfiltered) data -> yet dealing with a ’timelock’ structure with just a single very long continuous data epoch may be tedious in downstream analysis.
- As per the above, the output to ft_sourceanalysis will contain a source.avg.filter field, which contains the beamformer weights for the dipole locations in your sourcemodel. In combination with the sensor level data, you can subsequently use ft_virtualchannel, to ‘project’ the sensor data into source space.
- If you intend to make explicit qualitative/quantitative comparisons between individual virtual electrode time series, specifically with respect to their magnitude, please note that many source reconstruction techniques have a so-called depth bias (for ‘vanilla' beamformers this means: the further away a source is on average from the sensors, the larger the reconstructed amplitude will be overall)
Best wishes,
Jan-Mathijs
On 16 Sep 2025, at 23:17, Coyne, Caila Ann via fieldtrip <fieldtrip at science.ru.nl> wrote:
Dear FieldTrip community,
My name is Caila Coyne and I am a PhD student in Dr. Rachel Smith’s lab at the University of Alabama at Birmingham. Our lab uses dynamical network modelling of sEEG data to improve seizure onset zone localization in epilepsy patients. I am currently trying to apply similar techniques to source localized MEG signals.
Our MEG was recorded on a 148 channel 4D system, and I have a ~10 minute resting state clip per patient (no noise recordings were saved). My current pipeline involves bandpass filtering the MEG data from 2-50 Hz, computing covariance matrices on 500 ms trials, calculating the average covariance matrix over the trials, constructing a 3-layer BEM volume conduction model using OpenMEEG, then using FieldTrip’s scalar LCMV beamformer algorithm to estimate the time series at the coordinates corresponding to the implanted sEEG contact locations. What I expected to see was high correlation between the beamformed time series for virtual sensors that are in close spatial proximity but what I am finding is that time series are highly correlated along electrodes (i.e., along linear trajectories moving from the skull into the brain). I’ve attached a figure of an example of a beamformed trial separated by electrode.
My question is if this is expected behavior for a beamformer algorithm for resting state data or if there is likely something wrong with my pipeline? I have so far tried different filters, trial durations for computing data covariance matrices (500 ms - 7 seconds), volume conduction models (BEM vs single sphere), and multiple patients but these have all primarily impacted signal amplitude rather than the correlation trends we’re seeing.
The figure of the sEEG electrode locations, my code, and the data can be found at the box link:
https://uab.box.com/s/evymg1x4vg8qhy38pxhq2ydztwp2umuw<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuab.box.com%2Fs%2Fevymg1x4vg8qhy38pxhq2ydztwp2umuw&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C083741df11314ac300eb08ddf6bfcc22%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638938025816225162%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=QRGfShDnVxrXmYcVjrU0rjNxhbvcuP2tIS68R4K%2BZf0%3D&reserved=0>
Any help would be greatly appreciated.
All the best,
Caila
Caila Coyne | Graduate Student
Neuroengineering Ph.D. Program
UAB | Neural Signal Processing and Modeling Lab
cacoyne at uab.edu<mailto:cacoyne at uab.edu>
<Beamformed time series by virtual electrode.png>_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C083741df11314ac300eb08ddf6bfcc22%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638938025816275023%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=wKkuF7GVa7AUozOohIBgSG5mtaeeSUu9X%2Bdq3d1gCe4%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C083741df11314ac300eb08ddf6bfcc22%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638938025816320504%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=AEvkQ1VxeLrzJViYzm74MLOI6v6zm6W4WZs7lWgsFYY%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250918/f8da9b5d/attachment.htm>
More information about the fieldtrip
mailing list