<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Niloofar,<br class="">
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class=""><br class="">
</div>
<div class="">Why do you want to use ft_freqgrandaverage if the channels don’t match up across patients?</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs<br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 28 Feb 2023, at 17:37, Niloofar Tavakoli <<a href="mailto:niloofartavakoli1993@gmail.com" class="">niloofartavakoli1993@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<pre style="white-space: pre-wrap;" class=""><div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size:14pt" class="">Dear Fieldtrip community,</span></div>
<pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class="">My name is Niloofar Tavakoli and I am a Ph.D. candidate at Kral Lab at Hannover Medical School, Germany. I am doing a Time-Frequency analysis on LFP data.Here is the data structure:</span></pre><pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class="">There are several penetration sites for each subject and each site includes 30 electrodes (originally 32 electrodes but now 30 after applying bipolar derivation).</span></pre><pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class=""> </span></pre><pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class="">I would like to exclude some of these electrodes in the TFR analysis. (some of these electrodes are non-responsive so I would not like to have them in the grand TFR).</span></pre><pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class=""> </span></pre><pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><br class=""></pre><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:14pt;line-height:107%" class="">As far as I understood, the only way for </span><span lang="EN-US" style="font-size:14pt;line-height:107%;font-family:Consolas" class="">ft_freqgrandaverage </span><span lang="EN-US" style="font-size:14pt;line-height:107%" class="">to work is that the input data has the same number of
channels(in this case electrodes), but that is not the case in my data.</span></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:14pt;line-height:107%" class="">Can you please let me know of a function in
FieldTrip or maybe a trick how to cope with this?</span></p><pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><br class=""></pre><pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class="">Below you can find the code I tried to use</span></pre><div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size:12pt;font-family:Consolas" class="">cfg = [];</span></div><div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size:12pt;font-family:Consolas" class="">tfr_grand=ft_freqgrandaverage(cfg,tfr_evoked_3935,tfr_evoked_4510)</span></div><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;line-height:normal;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:14pt;font-family:Consolas" class=""> </span></p><div style="margin: 0cm 0cm 0.0001pt; line-height: normal; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size:14pt" class="">and the data is also attached</span><span lang="EN-US" style="font-size:14pt;font-family:Consolas" class="">.(</span><span lang="EN-US" style="font-size:12pt;font-family:Consolas" class=""> tfr_evoked_3935,
tfr_evoked_4510</span><span lang="EN-US" style="font-size:14pt;font-family:Consolas" class="">) </span><span lang="EN-US" style="font-size:14pt" class="">which are
the two example TFRs for two different penetration sites</span><span lang="EN-US" style="font-size:14pt;font-family:Consolas" class=""> </span><span style="font-family:Arial,Helvetica,sans-serif;font-size:small" class=""></span></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://urldefense.com/v3/__https://drive.google.com/file/d/1Rl6oA3bcp3B2Y9_BEJTzyUniq9NaBR4Q/view?usp=drive_web__;!!HJOPV4FYYWzcc1jazlU!4Js3YvORtgHgC4dfviuZre4xtkUykJsnn6FHjBiJYjk0zLzmt6qOn5Q834xqQvJBVx3NfJEYh_rGtQR_usQ7ClWgBdG2H18$" target="_blank" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:none" aria-label="tfr_evoked_3935.mat" class=""><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png" class=""> <span dir="ltr" style="vertical-align:bottom;text-decoration:none" class="">tfr_evoked_3935.mat</span></a><img src="x-msg://ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="opacity: 0.55; cursor: pointer; float: right; top: -1px; display: none;" class=""></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://urldefense.com/v3/__https://drive.google.com/file/d/16vt6h3tu5Zg1J-iOCKw2j8uxtwlrci1x/view?usp=drive_web__;!!HJOPV4FYYWzcc1jazlU!4Js3YvORtgHgC4dfviuZre4xtkUykJsnn6FHjBiJYjk0zLzmt6qOn5Q834xqQvJBVx3NfJEYh_rGtQR_usQ7ClWg17YRebE$" target="_blank" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:none" aria-label="tfr_evoked_4510.mat" class=""><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png" class=""> <span dir="ltr" style="vertical-align:bottom;text-decoration:none" class="">tfr_evoked_4510.mat</span></a><img src="x-msg://ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="opacity: 0.55; cursor: pointer; float: right; top: -1px; display: none;" class=""></div><br class="">

<pre style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class="">Any feedbacks and suggestions would be appreciated.</span></pre><pre style="white-space: pre-wrap;" class=""><pre style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class="">Kind Regards,</span></pre>



</pre>

<pre style="text-align:justify;margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class=""> </span></pre><pre style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class=""> </span></pre><pre style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class=""> </span></pre><pre style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:"Courier New"" class=""><span lang="EN-US" style="font-size:14pt;font-family:Calibri,sans-serif" class=""> </span></pre>



</pre>
<pre style="white-space: pre-wrap;" class=""><br class=""></pre>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
<br class="">
</body>
</html>