<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hi Caila, 
<div><br>
</div>
<div>I had a quick look at your code (+figures), and I don’t think that there is anything wrong with your pipeline as such.</div>
<div><br>
</div>
<div>That is, I assume that all went well with segmentation/coregistration/forward model computation such that the computed forward models are ‘valid’.</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>In general, if you would allow me to make some recommendations on some details in your pipeline:</div>
<div> - 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.</div>
<div>- 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.</div>
<div>- 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)</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On 16 Sep 2025, at 23:17, Coyne, Caila Ann via fieldtrip <fieldtrip@science.ru.nl> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
Dear FieldTrip community, </div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
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. </div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
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. </div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
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. </div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
The figure of the sEEG electrode locations, my code, and the data can be found at the box link:
</div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<a class="OWAAutoLink" id="LPlnk721362" href="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" originalsrc="https://uab.box.com/s/evymg1x4vg8qhy38pxhq2ydztwp2umuw" originalsrc="https://uab.box.com/s/evymg1x4vg8qhy38pxhq2ydztwp2umuw">https://uab.box.com/s/evymg1x4vg8qhy38pxhq2ydztwp2umuw</a></div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
Any help would be greatly appreciated. </div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
All the best, </div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: pre-wrap; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; direction: ltr; text-align: left; background-color: rgb(255, 255, 255); margin: 0px 0px 10.6667px; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
Caila </div>
<div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<br>
</div>
<div class="elementToProof" id="Signature" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;">
<br>
</div>
<div style="margin-top: 0px; margin-bottom: 0px;"><span style="font-family: Calibri, sans-serif; font-size: 12pt; color: rgb(30, 107, 82);"><b>Caila Coyne | Graduate Student </b></span></div>
<div style="margin: 0px; text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255);">
<span style="font-family: Calibri, sans-serif; font-size: 12pt; color: rgb(36, 36, 36);">Neuroengineering Ph.D. Program </span></div>
<div style="margin: 0px; text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255);">
<span style="font-family: Calibri, sans-serif; font-size: 12pt; color: rgb(36, 36, 36);">UAB | Neural Signal Processing and Modeling Lab</span></div>
<div style="margin: 0px; text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255);">
<span style="font-family: Calibri, sans-serif; font-size: 12pt; color: rgb(36, 36, 36);"><a href="mailto:cacoyne@uab.edu">cacoyne@uab.edu</a> </span></div>
</div>
<span id="cid:3A98392D-6396-42B9-B48A-3A7B751E6F04"><Beamformed time series by virtual electrode.png></span><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;">fieldtrip
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<a href="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" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<a href="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" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br>
</div>
</body>
</html>