<html 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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="en-DE" link="blue" vlink="purple" style="word-wrap:break-word;-webkit-nbsp-mode: space;line-break:after-white-space">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hi </span>
<span style="color:black;background:white">Jan-Mathijs</span><span lang="EN-US">,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks a lot for your reply! Apologies for not being entirely clear in the question behind my question. The question is most related to visualization – I want to visualize the alpha power from single trial MEG source
 data per parcel (parcellated according to a brain atlas). I am sure that I need to use ft_virtualchannel because by using this function I can keep the trials and trial info after parcellating the single trial source data, which I cannot otherwise seem to keep
 using ft_sourceparcellate.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks so much for all the information, this was very helpful. I am only still slightly unsure about how to implement what you wrote in your last paragraph: (QUOTE) “</span><span style="color:black;background:white">map
 the scalars back onto the original volume, and then you could use ft_sourceinterpolate to obtain a data structure that maps the low resolution volume back onto a high resolution volume (containing a template anatomical image), so that you can visualize it
 in ft_sourceplot.</span><span lang="EN-US" style="color:black;background:white">” Do you mind expanding upon how one would map the scalars back to the original volume? Apologies if this is quite straightforward, I’m just slightly confused by the phrasing here.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Thanks a lot again and all the best,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Marta<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of "Schoffelen, J.M. (Jan Mathijs) via fieldtrip" <fieldtrip@science.ru.nl><br>
<b>Reply to: </b>FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Date: </b>Friday, 27. January 2023 at 10:43<br>
<b>To: </b>FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Cc: </b>"Schoffelen, J.M. (Jan Mathijs)" <janmathijs.schoffelen@donders.ru.nl><br>
<b>Subject: </b>Re: [FieldTrip] Value per parcel after running ft_virtualchannel<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Hi Marta, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I must say that I don’t understand the question behind your question. What is it you want to achieve? You mention that you wish to know about (QUOTE) "<span style="color:black;background:white">the most effective way to replicate this output/reshape
 the output of ft_virtualchannel or somehow with ft_virtualchannel in the easiest possible way obtain one value per parcel”. And then you mention a few data structures that in part seem to have been handcrafted. What is it what you want to achieve? Are you
 sure that ft_virtualchannel is the function you want to use? Is the question underlying your question related to visualization, statistics, something else?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:white">The purpose of ft_virtualchannel - as it’s name suggests - is to create a data structure that contains virtual channels, i.e. a representation of data that behaves as if it’s channel level data,
 but now with each of the channels representing time series (or frequency domain fourier spectra) mapped onto a location/parcel in source space. The output of ft_virtualchannel can be further processed to obtain derived quantities from the time series, e.g.
 a value that represent the power in a particular frequency band, for instance the alpha band. In order to obtain that, one would run ft_freqanalysis on the output of ft_virtualchannel, and e.g. followed by ft_selectdata with a specified frequency range, and
 avgoverfreq = ‘yes’. Then, in order to visualize the result, one would require the mapping from the individual virtual channels to the original source space, which is represented in the brainordinate field, which in your case seems to be a low resolution 3D-grid
 based representation of an anatomical atlas that is defined on a volume.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:white">I don’t know by heart what (and whether there exists any) the smoothest procedure will be for visualization in FT. If there is no mention anywhere in the documentation to visualize this easily,
 I suspect that you need to map the scalars back onto the original volume, and then you could use ft_sourceinterpolate to obtain a data structure that maps the low resolution volume back onto a high resolution volume (containing a template anatomical image),
 so that you can visualize it in ft_sourceplot.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:white">Good luck, and happy computing,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black;background:white">Jan-Mathijs</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 26 Jan 2023, at 17:53, Marta Stojanović via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">Hi, </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">I hope this email finds you well. I have a question about obtaining one power value per parcel after using ft_virtualchannel. I guess there must be a way to
 create a dummy struct that could solve this problem, so apologies if there is a straightforward answer, but I am finding it hard to obtain one value per parcel after interpolating source data onto an atlas and running ft_virtualchannel.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">I run ft_virtualchannel instead of ft_sourceparcellate because I want to keep trial information which I couldn’t keep with the output of ft_sourceparcellate.
 The output of ft_virtualchannel that I obtain through this looks like: </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">  struct with fields:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            trial: [142×246×1018 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            time: [1×1018 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            dimord: 'rpt_chan_time'</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            label: {246×1 cell}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            cfg: [1×1 struct]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            grad: [1×1 struct]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            sampleinfo: [142×2 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            trialinfo: [142×2 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">            brainordinate: [1×1 struct]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">After I use some fields from a previously generated average of alpha power along with fields from the ft_virtualchannel output to create the following dummy
 source struct:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">     trial: [142×246 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">     time: 0</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">     cfg: [1×1 struct]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">     dim: [26 33 28]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">     pos: [24024×3 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">     pow: [24024×1 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">The data is collapsed across time, but the pow field is the multiplication of the dimensions of the tissue (26 * 33 * 28), rather than a value per parcel.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">I know from the Fieldtrip tutorials online that the output of ft_sourceparcellate can look like this:</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black;background:white">parcel =</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black;background:white">           label: {1x116 cell}   % brain parcels labels</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">  </span><span style="color:black;background:white">         anatomy: [116x1 double]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">           </span><span style="color:black;background:white">anatomydimord: 'chan_unknown'</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black;background:white">           pow: [116x1 double] % one value of brain activity per parcel</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">      </span><span style="color:black;background:white">     powdimord: 'chan'</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">           </span><span style="color:black;background:white">brainordinate: [1x1 struct]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black;background:white">           cfg: [1x1 struct]</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">I’m wondering if you could perhaps point me to the most effective way to replicate this output/reshape the output of ft_virtualchannel or somehow with ft_virtualchannel
 in the easiest possible way obtain one value per parcel. Essentially, I’m most interested in replicating or obtaining the ‘pow’ field from the ft_sourceparcellate output where I would have one power or activity estimate per parcel.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">I hope the question makes sense, and I can of course elaborate or explain further if not. Either way, thanks a lot in advance!</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">All the best, </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span lang="EN-US" style="color:black;background:white">Marta</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Helvetica">_______________________________________________<br>
fieldtrip mailing list<br>
</span><a href="https://urldefense.com/v3/__https://eur04.safelinks.protection.outlook.com/?url=https*3A*2F*2Fmailman.science.ru.nl*2Fmailman*2Flistinfo*2Ffieldtrip&data=05*7C01*7Cmarta.stojanovic*40student.uva.nl*7C58e4eaf056504b0cd8e908db004afc2a*7Ca0f1cacd618c4403b94576fb3d6874e5*7C0*7C0*7C638104094288260531*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=sjTecY3XWmq*2Fg7U8h9xZuolrxSY6lU21lgVCNj7HF*2Fs*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUl!!HJOPV4FYYWzcc1jazlU!-oDrG47WBPRQF_h2uvgFyNBqOpTDLMv96ivdTN3w3U8wGOem0TzmzK0JStgmj4zl_GkVYx1G7TNFM2XYIUWRs7cSJlYWTiSj19pnxJo$"><span style="font-size:10.5pt;font-family:Helvetica">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</span></a><span style="font-size:10.5pt;font-family:Helvetica"><br>
</span><a href="https://urldefense.com/v3/__https://eur04.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fdoi.org*2F10.1371*2Fjournal.pcbi.1002202__*3B!!HJOPV4FYYWzcc1jazlU!8FT62BXQNEdwl2ym7MPEQPvYBcvuo-W43pLyc6ErhtPG0h_Hp9l1IoqOijJMJZURZi3EiUNhvyTmqzhBhs0cuQQkEAHPRgVe3c7Egw*24&data=05*7C01*7Cmarta.stojanovic*40student.uva.nl*7C58e4eaf056504b0cd8e908db004afc2a*7Ca0f1cacd618c4403b94576fb3d6874e5*7C0*7C0*7C638104094288260531*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=8kvEnFGbFD1Xm8qs4Ne1yJHGgotobY75Fqz5y4mgdDQ*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!HJOPV4FYYWzcc1jazlU!-oDrG47WBPRQF_h2uvgFyNBqOpTDLMv96ivdTN3w3U8wGOem0TzmzK0JStgmj4zl_GkVYx1G7TNFM2XYIUWRs7cSJlYWTiSj1l7jU-c$"><span style="font-size:10.5pt;font-family:Helvetica">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!8FT62BXQNEdwl2ym7MPEQPvYBcvuo-W43pLyc6ErhtPG0h_Hp9l1IoqOijJMJZURZi3EiUNhvyTmqzhBhs0cuQQkEAHPRgVe3c7Egw$</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>