<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
@font-face
{font-family:"\@MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:"MS PGothic";
panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
{font-family:"\@MS PGothic";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-fareast-language:JA;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;
mso-ligatures:none;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Hi Marisa,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">To cancatenate data you can use ft_appenddata. Since in your data there are missing channels in some of your runs (rejected from ICA), the function will return a data structure containing
only the channels which are present in all runs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">One workaround is to add NaNs as data for the missing channels, bringing them back in your data structure and then concatenate. To remove the NaNs before your source reconstruction,
you can then set cfg.nanmean = 'yes' in ft_timelockanalysis.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">I hope that helps,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US">Konstantinos<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#2F5597">Konstantinos Tsilimparis<br>
MSc graduate</span><span style="font-size:10.0pt;color:#2F5597"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#2F5597">Donders Institute for Brain, Cognition and Behaviour</span><span lang="JA" style="font-size:10.0pt;font-family:"MS Gothic";color:#2F5597">・瘢雹</span><span style="font-size:10.0pt;color:#2F5597">R</span><span lang="EN-US" style="font-size:10.0pt;color:#2F5597">adboud
University <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#2F5597">Nijmegen</span><span lang="JA" style="font-size:10.0pt;font-family:"MS Gothic"">・瘢雹</span><span style="font-size:10.0pt;color:#2F5597">The Netherlands</span><span lang="EN-US" style="font-size:10.0pt;color:#2F5597"><br>
contsili.github.io</span><span style="font-size:11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> fieldtrip <fieldtrip-bounces@science.ru.nl>
<b>On Behalf Of </b>Marisa Monika Amalie Birk via fieldtrip<br>
<b>Sent:</b> Tuesday, November 5, 2024 6:32 PM<br>
<b>To:</b> fieldtrip@science.ru.nl<br>
<b>Cc:</b> Marisa Monika Amalie Birk <marisa.birk@unitn.it><br>
<b>Subject:</b> [FieldTrip] Merging runs with different grad.tra matrix<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear FieldTrippers,<br>
<br>
I am working with MEG data from multiple runs, each ca. 8 min long and saved as separate files. I have applied MaxFilter with a target head position and preprocessed each run individually, including ICA, and now want to concatenate the data before doing source
reconstruction.<br>
<br>
Up until the ICA, the grad struct was identical between runs. However, using ft_componentanalysis and ft_rejectcomponent changed the grad.tra matrix, leading to differences across runs. This means I can't simply merge the datasets. This
<a href="https://www.fieldtriptoolbox.org/faq/how_are_electrodes_magnetometers_or_gradiometers_described/" target="_blank">
tutorial</a> emphasizes how important the grad.tra field is for computing the leadfields and that it should remain consistent with the data manipulations - so I assume that I can not simply use the grad.tra matrix from before the ICA.<br>
<br>
Do you have suggestions on how I should proceed? Should I perform source reconstruction separately for each run, or is it better to concatenate the runs first and then do the ICA on the full dataset? The runs are also rank-deficient and have slightly different
ranks due to MaxFiltering, so I am unsure about merging them before ICA to avoid rank mismatches.
<br>
<br>
Are there alternative approaches you would recommend?<br>
<br>
Thank you!<br>
<br>
Best regards<span style="color:#888888"><br>
Marisa<br>
<br>
</span><o:p></o:p></p>
<p><strong><span style="font-family:"Aptos",sans-serif">Marisa Birk</span></strong><br>
PhD Student in Cognitive and Brain Sciences,<br>
<a href="https://www.cimec.unitn.it/en/929/action-recognition-and-concepts-group" target="_blank">Action Recognition and Concepts Group (CIMeC)</a>
<o:p></o:p></p>
<p>Center for Mind and Brain Sciences (CIMeC),<br>
University of Trento, Italy<o:p></o:p></p>
</div>
</div>
</body>
</html>