[FieldTrip] Value per parcel after running ft_virtualchannel

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Fri Jan 27 10:09:18 CET 2023


Hi Marta,

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) "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?

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.

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.

Good luck, and happy computing,
Jan-Mathijs



On 26 Jan 2023, at 17:53, Marta Stojanović via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hi,

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.

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:

  struct with fields:

            trial: [142×246×1018 double]
            time: [1×1018 double]
            dimord: 'rpt_chan_time'
            label: {246×1 cell}
            cfg: [1×1 struct]
            grad: [1×1 struct]
            sampleinfo: [142×2 double]
            trialinfo: [142×2 double]
            brainordinate: [1×1 struct]




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:

     trial: [142×246 double]
     time: 0
     cfg: [1×1 struct]
     dim: [26 33 28]
     pos: [24024×3 double]
     pow: [24024×1 double]

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.

I know from the Fieldtrip tutorials online that the output of ft_sourceparcellate can look like this:

parcel =
           label: {1x116 cell}   % brain parcels labels
           anatomy: [116x1 double]
           anatomydimord: 'chan_unknown'
           pow: [116x1 double] % one value of brain activity per parcel
           powdimord: 'chan'
           brainordinate: [1x1 struct]
           cfg: [1x1 struct]


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.


I hope the question makes sense, and I can of course elaborate or explain further if not. Either way, thanks a lot in advance!


All the best,
Marta

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!8FT62BXQNEdwl2ym7MPEQPvYBcvuo-W43pLyc6ErhtPG0h_Hp9l1IoqOijJMJZURZi3EiUNhvyTmqzhBhs0cuQQkEAHPRgVe3c7Egw$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230127/52e07fd1/attachment.htm>


More information about the fieldtrip mailing list