Can we extract time series data of all vertices?

Dear Brainstorm users,

Now, I check variables of a source data file, and find the variable “ImagingKernel”, which consists of all vertices(15000)×Time(?)(300).
However, the time length is not consistent with the length I would like to extract (e.g., 30000), based on my experimental design.
I am wondering whether this variable might be compressed or down sampled somehow in time sequence.

All I want to do is to extract the original time series data (e…, 30000) from all vertices(15000).
How can I do this ???

Ohki

Hello,

The description of source files can be found in this tutorial:
http://neuroimage.usc.edu/brainstorm/Tutorials/SourceEstimation

The new introduction tutorials are now ready for use:
http://neuroimage.usc.edu/brainstorm/TutorialsNew

Cheers,
Francois

Dear Francois

Many thanks for your reply.

I am reading the description of source files in the tutorial you mentioned.

ImagingKernel: [Nsources x Nchannels] Linear inverse operator that must be multiplied by the recordings in order to get the full source time series. If defined, ImageGridAmp must be empty.
ImageGridAmp: [Nsources x Ntime] Full source time series, in Amper.meter. If this field is defined, ImagingKernel must be empty.

I need “ImageGridAmp”, but it is empty.
Then, how can I extract the original time series data from all vertices?

Use the advanced option “Full results”:
http://neuroimage.usc.edu/brainstorm/Tutorials/SourceEstimation#Advanced_options_.5BTODO.5D

Or use the function in_bst_results(FileName, LoadFull=1):
http://neuroimage.usc.edu/brainstorm/Tutorials/SourceEstimation#Useful_functions

Dear Francois

I am thankful for your kind support.
I tried two ways you suggested. However, since my data consists of a long time sequence, “Full results” doesn’t work well. (“Full results” for a short time sequence worked properly.)
Then, as the second approach, I tried to conduct “in_bst_results”. But, I am not sure of how to use it.

My procedure was as following:
(1) The Source data file (eg., “S”) was exported to Matlab. In Workspace, we obtained “S”.
(2) In command window, I typed "in_bst_results(S, LoadFull=1).
(3) Error message returned: “The expression to the left of the equals sign is not a valid target for an assighment”

What is wrong in my procedure?
I am sorry for keeping bothering you.

Ohki

Hi Ohki,

You can do the following:

  1. Right-click on the file to load > File > Copy file path to clipboard
  2. In the Matlab command window: ResultsFile = ‘…paste the file path with CTRL+V…’;
  3. ResultsMat = in_bst_results(ResultsFile, 1);

But it is not going to change the size of the matrix that is generated. If you cannot compute and save the sources with the option “Full results”, you may not be able to use in_bst_results either. You need a computer with more memory or shorter recordings (or downsampled to a lower frequency rate).

Cheers,
Francois

Dear Francois

As you said, “in_bst_results” also needed a lot of memory, but it worked well somehow.
Thank you so much.

By the way, May I ask another question?
Previously, I extracted source data, using “atlas” function.
This procedure can reduce the amount of data in the number of vertices. For instance, using “Destrieux”, the number of source data consisting of 15000 vertices can be reduced to 148.
However, one problem I face now is that I cannot return the extracted source data to the cortical surface, since the original number of vertices 15000 is not equal to the number of the extracted data. (The original data size 15000 × Time, The extracted data size 148 × Time). If possible, I would like map the extracted data (148 × Time) on the cortical surface. Do you have any solution to this?

Ohki

We don’t really recommend to use this “downsample to atlas” function. It was en experiment to try to reduce the size of the data before running connectivity but this approach doesn’t work well. Instead, we now use directly the definition of the scouts in the connectivity functions.
Also, this process was more designed to run on random parcellations of the brain with 200-400 scouts. The Destrieux atlas constains regions that are a bit too large to be used as scouts (especially with constrained source models).

However, it should all work, you should be able to directly double-click on the source maps “downsampled to atlas” to display them.
Please describe what you did and what is not working. If you get any error message, please copy-paste them here.