I am wondering how long the "Compute Sources" and "Extract Scout Time Series" functions should take, as it currently performs it really fast which makes me a bit suspicious.
Some information so that some assumptions can be made:
Data structure when I click on EEG/MAT | 130 scouts -> File -> Export to MATLAB
My real question/Why I am writing this long as post
The whole process of calculating the sources and extracting the scout time series took roughly 15 minutes, with most time being spent on the PCA calculation for each scout.
I am suspicious that this is too fast, and that I am doing something wrong here. Are my suspicions correct and if so, where to I make a mistake?
15 minutes already sounds very long.
The computation of the MNE inverse solution is independent from the data and is expected to take only a few seconds.
Your signals look very long - is this resting state data?
In general, we recommend importing native file formats instead of manually semi-processed recordings from a .mat file, and then linking them to the database for preprocessing using the menu "Review raw file", as illustrated in the introduction tutorials. But maybe this is not applicable to your case. https://neuroimage.usc.edu/brainstorm/Tutorials
My computer is on the older side, this might explain it?
It is resting-state data indeed. I am importing completely preprocessed EEG files.
I was testing a few things and found out that if I use the "unconstrained" option when calculating the sources and afterwards extracting the scout time series, my computer crashes, but if I use the "constrained" option it works without a problem. Why does this happen? For resting-state EEG data and scout time series extraction, is the best option "constrained" or "unconstrained"?
EDIT: I just checked, before my computer crashes, it reaches 100% RAM usage and 100% ROM usage. I used "unconstrained" in the calculate sources 2018 (which does not result in a problem, the problem occurs during the extract scout time series step) and selected the "unconstrained sources: Norm of the three orientations (x,y,z)" option in the extract scout time series option.
I discussed my problem with a colleague who told me that it is logical that my computer crashes since I want to extract all 130 timeseries in a single run (I would need too many GB of RAM to be able to do this).
I was now wondering if it is possible to run "Extract scout time series" multiple times after each other, each time extracting a few scouts. In the process editor I see that I can't place multiple "Extract scout time series" options after each other. So I think making a script would be best right? Or is there a logical reason why "Extract scout time series" can't be used multiple times?
Thanks in advance for the patience.
EDIT: So I tried a very basic script adjustment: I copied the first "extract scout time series" and adjusted the names of the two scouts that should be extracted.
Any idea why it is happening and how I can solve it?
EDIT 2:
I think it has to do with what data exactly is loaded at the time of calling the "extract scout time series" function. I adjusted the script slightly so that now it reruns the "compute sources 2018" function before the second time I call the "extract scout time series" function, and now I get this error:
I was now wondering if it is possible to run "Extract scout time series" multiple times after each other, each time extracting a few scouts. In the process editor I see that I can't place multiple "Extract scout time series" options after each other. So I think making a script would be best right? Or is there a logical reason why "Extract scout time series" can't be used multiple times?
There is no reason for not calling multiple times the process "Extract scouts time series", but this would be terribly inefficient: it would load all the data, the inverse kernel, multiply the two to reconstruct this gigantic source matrix (Nsources x Ntime) in memory, and then average a few sources to get the scout time series. If you call twice the process, all this is done twice...
To optimize the memory and CPU usage of your scripts: learn how to use the resource monitor of your operating system, and the Matlab Profiler.
Why do you need all the time points loaded at once?
The most logical, if you want to split the process in two for memory reasons, would be to split the data along the time dimension. You need continuous signals at the end, you can concatenate the scout signals easily with a process.
I copied the first "extract scout time series" and adjusted the names of the two scouts that should be extracted.
Any idea why it is happening and how I can solve it?