Issue trying to compute surces wiht MEM with EEG recordings,

There´s an issue in the EEG and Epilepsy Tutorial that I can´t solve without help. It is regarding source analysis with MEM inverse solution. This process is a basic for all my work. In the tutorial says that it has to be use the baseline dataset that was previously extracted in the Noise covariance matrix calculation (110,160)ms. The process creates the Noise covariance file, but no the dataset (raw time series), just the image. When it comes to the point to the MEM inverse solution analysis, it says that “the 10s segment raw data “Raw (120.00,130.00s)” has to be copy and paste it in the folder “SPIKE”. I runed several times all the process but there is no such thing as that 10s segment raw data extraction process. I looked all over the 28 tutorials but couldn´t find how to “extract” that raw segment, copy and pasted it in other folders. I tried creating an event with that characteristics and importing it into the database but didn’t worked. If he process doesn’t find the baseline doesn’t run. Is there something missing in the EEG and Epilepsy tutorial? Did I missed something (or many)? I’ve to read another tutorial(s) in the other analysis scenarios or in the advance tutorials collections? I read the MEM tutorial and there it says the specifics about the baseline but not how to extract the raw time series and use it as a baseline,
Please advice,

@Palaccivatbfc
There is indeed something to fix in this tutorial. I added a warning at the beginning of the MEM section, and moved it at the end of the page.
The BEst toolbox is maintained outside of Brainstorm by external contributors. We are currently waiting for updates from their end. I'm sorry I can't help you much with your questions related with the MEM method.

@cgrova @aliobaibk
Could you please give us a timeline for the maintenance of the BEst toolbox?
This includes:

Thanks
Francois

Thank you very much,
I also found there's something else but it is with MATLAB, the system is sending this message:

Matlab Optimization toolbox fminunc.m not found. Using alternate optimization routine...
Invalid MEX-file '/Users/Palacciv/.brainstorm/brainentropy/minFunc/lbfgsC.mexmaci64':
dlopen(/Users/Palacciv/.brainstorm/brainentropy/minFunc/lbfgsC.mexmaci64, 6): Library not loaded:
@loader_path/libmex.dylib
Referenced from: /Users/Palacciv/.brainstorm/brainentropy/minFunc/lbfgsC.mexmaci64
Reason: image not found,

fminunc.m is installed.
So I'm going to look for the answer to this with the MATLAB support team and see what it is,
I'll keep everybody posted,

Jorge

@aliobaibk Wouldn't there be Matlab-only alternatives for the optimization functions you need?
Maintaining MacOS mex files over the years can be painful.
Including them in the compiled version of Brainstorm might be complicated too.

Well I'm planning to work under MATLAB, so I'll look for the optimization functions as you say and also wait for the BEst toolbox updates,

Hello Jorge,

Thank you for bringing these issues to our attention.

For the issue with fminunc and minFunc:

  • The BEst toolbox defaults to minFunc when the following command returns false: license('test', 'Optimization_Toolbox')
  • You indicate that you have access to a file named fminunc.m, but the Optimization toolbox may not be installed (to be checked?).
  • Your issue here with minFunc is related to some MEX files, an easy and temporary fix to this would be the following edit. Change line 140 of the file .brainstorm/brainentropy/minFunc/minFunc_processInputOptions.m as follows:
    [FROM] useMex = getOpt(o,'USEMEX',1);
    [TO] useMex = getOpt(o,'USEMEX',0);
    The 0 forces the default option for using MEX files to be false.

I will make sure to have this option accessible from the BEst GUI along with a fix to the baseline file selection issue in the next release, scheduled for the end of the week.

Hello, sorry for the delay and thank you very much for your help,

I'll follow your guide and let you know how it worked,