Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrainEntropy: Move to the plugin manager? #389

Closed
ftadel opened this issue Mar 13, 2021 · 9 comments
Closed

BrainEntropy: Move to the plugin manager? #389

ftadel opened this issue Mar 13, 2021 · 9 comments

Comments

@ftadel
Copy link
Member

ftadel commented Mar 13, 2021

@multifunkim @aliobaibk @YounesZ @klacourse

I added a new solution for managing the packages downloaded by Brainstorm:

It would be great if we could also move the BrainEntropy toolbox to this framework, in order to have everything managed in a centralized way. This will also allow to have automated builds including all the dependencies, to have the BE toolbox compiled with Brainstorm.
Having the MEM included in the compiled distribution of Brainstorm has been requested recently on the forum:
https://neuroimage.usc.edu/forums/t/best-toolbox-in-brainstorm-compiled-version/25898

Who could help me with this task?
Maybe we could organize a short meeting to plan these changes?

@Edouard2laire
Copy link
Contributor

Hello,

I'll raise the question during our MEM meeting tomorrow morning. Personnally, i won't have time before early april.

Édouard

@ftadel
Copy link
Member Author

ftadel commented Apr 1, 2021

I copy here the list of other requests I posted on the forum:
https://neuroimage.usc.edu/forums/t/issue-trying-to-compute-surces-wiht-mem-with-eeg-recordings/26910/2?u=francois

@aliobaibk
Copy link
Contributor

Hello @ftadel

  • Got it, I will be updating BEst for better handling the baseline file in the forthcoming days and @multifunkim is working on the tutorials.
  • Concerning the dependence to fminunc, the toolbox defaults to minFunc (shipped with BEst) if license('test', 'Optimization_Toolbox') returns false.

@ftadel
Copy link
Member Author

ftadel commented Apr 5, 2021

Concerning the dependence to fminunc, the toolbox defaults to minFunc (shipped with BEst) if license('test', 'Optimization_Toolbox') returns false.

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.

@aliobaibk
Copy link
Contributor

aliobaibk commented Apr 5, 2021

Hello @ftadel

minFunc is in fact a MATLAB-only alternative but additionally uses by default MEX files for speeding things up.
I will be adding a parameter to the BEst panel so that users can choose to use or not this speedup feature (users can already choose between fminunc and minFunc with mincFunc being automatically set if the optimization toolbox is not present).

Thanks

@ftadel
Copy link
Member Author

ftadel commented Apr 6, 2021

Concerning the dependence to fminunc, the toolbox defaults to minFunc (shipped with BEst) if license('test', 'Optimization_Toolbox') returns false.

This test doesn't work: it tests for what the license allows, not for what is installed on the computer.
See what I get in my MATLAB install, which does not include the optimization tb:

>> license('test', 'Optimization_Toolbox')

ans =

     1

>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.10.0.1602886 (R2021a)
MATLAB License Number: 521249
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19042)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB                                                Version 9.10        (R2021a)
Curve Fitting Toolbox                                 Version 3.5.13      (R2021a)
Image Processing Toolbox                              Version 11.3        (R2021a)
MATLAB Compiler                                       Version 8.2         (R2021a)
MATLAB Compiler SDK                                   Version 6.10        (R2021a)
Parallel Computing Toolbox                            Version 7.4         (R2021a)
Signal Processing Toolbox                             Version 8.6         (R2021a)
Statistics and Machine Learning Toolbox               Version 12.1        (R2021a)
Wavelet Toolbox                                       Version 5.6         (R2021a)

You should replace this test with a much simpler:
if exist('fminunc', 'file')

minFunc is in fact a MATLAB-only alternative but additionally uses by default MEX files for speeding things up.
I will be adding a parameter to the BEst panel so that users can choose to use or not this speedup feature (users can already choose between fminunc and minFunc with mincFunc being automatically set if the optimization toolbox is not present).

It would be great for the future compatibility of this library, thanks.

@aliobaibk
Copy link
Contributor

Hello @ftadel

Indeed, as you note, one may have a license for a toolbox but not have it installed and the test that you propose catches partially this case, and I agree that it should be added.
In addition, one may have a toolbox installed with no license to run its functions and the previous test with license(...) catches this case.
I will be combining the two.

Thanks

@ftadel
Copy link
Member Author

ftadel commented Apr 27, 2021

It should be working now, both with the Matlab and the compiled versions of Brainstorm.
Please test it and confirm that we can close this issue.

The work left to do includes only documentation:

@aliobaibk
Copy link
Contributor

Hello @ftadel,
The tests were successful.
@multifunkim is currently working on the tutorials.
Thanks

@ftadel ftadel closed this as completed Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants