Comments (17)
Hello Francois,
Since the PR has been merged in Brainstorm, I think we can close this issue.
One last question for you and @thomas-vincent, What should we do about the previous installation scheme? (eg nst_install script) ? Should I remove them from the current repository?
Can you confirm me, also, that Nirstorm is currently included in the compiled version of Brainstorm?
from nirstorm.
from nirstorm.
One last question for you and @thomas-vincent, What should we do about the previous installation scheme? (eg nst_install script) ? Should I remove them from the current repository?
This is not useful for Brainstorm, so I don't have any opinion.
Can you confirm me, also, that Nirstorm is currently included in the compiled version of Brainstorm?
It should. All the Nirstorm code is compiled and included in the package.
I've just re-compiled it with fixes so that the Nirstorm processes appear in the Pipeline Editor window:
brainstorm-tools/brainstorm3@3bdbed0
There might be other issues, but since I don't work with NIRS data at all, it's difficult for me to test it.
Can you please try it, and make sure that all your standard tools work well with this new compiled package?
from nirstorm.
And close the issue when you validated that it works.
from nirstorm.
One more problem to solve: the co-dependency of the nirstorm and brainentropy plugins.
Now we moved the MEM functions as a separate plugin, I'd like to move be_main.m and panel_brainentropy.m to the brainentropy github repo:
Therefore process_nst_cmem.m
and process_nst_cmem_fusion.m
GetDescription() function crash when the brainentropy plugin is not installed. I see two options for this problem:
- you rewrite the beginning of the process with something like:
if ~exist('be_main',2), sProcess.Index=0; end
to hide them when the brainentropy plugin is not installed. - you make nirstorm dependent on brainentropy, so that installing nirstorm always causes the installation of brainentropy.
For both options: set sProcess.options.mem.Value=[]
instead of be_main(), since panel_brainentropy already defines its own default values.
from nirstorm.
Hello
What do you think of this :
% Options: MNE options
sProcess.options.mem.Comment = {'nst_MEM_option', 'Estimation options: '};
sProcess.options.mem.Type = 'editpref';
sProcess.options.mem.Value = [];
with nst_MEM_option.m
function [varargout] = nst_MEM_option(varargin)
% Install/load brainentropy plugin
[isInstalled, errMessage] = bst_plugin('Install', 'brainentropy', 1);
if ~isInstalled
varargout={}
return;
end
varargout=panel_brainentropy();
end
so Best is installed when you click on the option button.
from nirstorm.
No: The GetDescription() functions are called often and must be as fast and as self-contained as possible. Calling external functions from there is not recommended, and installing plugins from it is impossible.
If you want the two plugins nirstorm and brainentropy to be linked, this is exactly what RequiredPlugs
does in the plugin definition.
PlugDesc(end).RequiredPlugs = {'brainentropy'}
from nirstorm.
nst_MEM_option is only called if you click on the button; no ? i tried to put a disp inside; and its not displayed if you don't click on the button. Meaning the function is not called
from nirstorm.
If you want the two plugins nirstorm and brainentropy to be linked, this is exactly what
RequiredPlugs
does in the plugin definition.
PlugDesc(end).RequiredPlugs = {'brainentropy'}
ok. this might be the better option. it's just that not a lot of people will be using MEM when using Nirstorm. So i am not sure it's ok to 'force' everyone that is using nirstorm to also dowload Best; but guess that's ok :) Can I ask you to make this change in the brainstorm repo ? :)
from nirstorm.
nst_MEM_option is only called if you click on the button; no ? i tried to put a disp inside; and its not displayed if you don't click on the button. Meaning the function is not called
This is bad coding practice. Please chose between:
- making brainentropy plugin a requirement for installing the nirstorm plugin (heavier)
- making some nirstorm processes available only when brainentropy is installed. For example, you can grey them out by defining an empty InputTypes list when
~exist('be_main',2)
, and/or hide the options and display a message "you must install the brainentropy plugin to enable this process" with option typelabel
.
from nirstorm.
ok. this might be the better option. it's just that not a lot of people will be using MEM when using Nirstorm. So i am not sure it's ok to 'force' everyone that is using nirstorm to also dowload Best; but guess that's ok :) Can I ask you to make this change in the brainstorm repo ? :)
Second option with having a label asking the installation of an extra plugin is lighter.
It depends how much you think a typical Nirstorm user would use the MEM functions: a lot=option 1, very little=option 2
from nirstorm.
ok. I will use the second option. Should make the change latter today in the nirstorm repository. May i ask you why the proposed option is a bad coding practice ?
from nirstorm.
Hello @ftadel,
I just realized that when nirstorm is loaded, we cannot download any other plugin. What could be the reason?
from nirstorm.
May i ask you why the proposed option is a bad coding practice ?
I'm trying to separate as much as possible:
- the package management (plugin installation),
- the batch management (pipeline editor)
- the interactive environment of the user
The batch management should be something completely static, independent from the user's local installation. One goal is to be able to generate scripts that are sent to a distant computation node. Therefore it should not be the batch editor that installs the plugin, but the batch execution (either the calling script or the process itself in the Run() function).
The function GetDescription() deals with metadata only, it operates at the level of the batch editor. The Run() function is responsible for the computation and should deal with missing parts of the processing environment, and install the missing plugins.
If you want to be really formal: brainentropy is a requirement for nirstorm.
If you don't want to enforce this, then find solutions that disable some of your functions when they are not available.
But you should not try to implement any behavior that cannot be reproduced by a script (installing a dependent plugin manually from a .m script is possible, installing it automatically from the Run() function too, but not "installing something when a button is pressed in the pipeline manager window").
I'm not sure I managed to be very clear here... but this bothers me because this is the kind of non-scriptable behaviors we're trying to remove from the software.
We have other solutions, so let's go another route :)
from nirstorm.
I just realized that when nirstorm is loaded, we cannot download any other plugin. What could be the reason?
I can't reproduce this problem...
from nirstorm.
One more problem to solve: the co-dependency of the nirstorm and brainentropy plugins.
Now we moved the MEM functions as a separate plugin, I'd like to move be_main.m and panel_brainentropy.m to the brainentropy github repo:Therefore
process_nst_cmem.m
andprocess_nst_cmem_fusion.m
GetDescription() function crash when the brainentropy plugin is not installed. I see two options for this problem:
- you rewrite the beginning of the process with something like:
if ~exist('be_main',2), sProcess.Index=0; end
to hide them when the brainentropy plugin is not installed.- you make nirstorm dependent on brainentropy, so that installing nirstorm always causes the installation of brainentropy.
For both options: set
sProcess.options.mem.Value=[]
instead of be_main(), since panel_brainentropy already defines its own default values.
Actually, it doesnt't work. it seems GetDescription is not called after Brainstorm is started. So if Best is not in the path when brainstorm is started then you cannot use Best so you need to load Best and then restart Brainstorm.
Issue is also that if you quit matlab, Best is removed from the path. so Every-time, we need to open brainstorm, add Best, and restart Brainstorm ...
For both options: set
sProcess.options.mem.Value=[]
instead of be_main(), since panel_brainentropy already defines its own default values.
Also it seems that panel_brainentropy doesn't initialize everything
from nirstorm.
Actually, it doesnt't work. it seems GetDescription is not called after Brainstorm is started. So if Best is not in the path when brainstorm is started then you cannot use Best so you need to load Best and then restart Brainstorm.
You could make it load automatically just like nirstorm, by adding:
PlugDesc(end).AutoLoad = 1;
Does that solve the issue?
Also it seems that panel_brainentropy doesn't initialize everything
Maybe this is something that could be fixed in panel_brainentropy.m directly, to make it more self-contained?
(panel_brainentropy could call be_main.m, as they are in the same folder)
from nirstorm.
Related Issues (20)
- Check for negative values in process_nst_mbll.m is done on NIRS and AUX data HOT 2
- Scale of the sensitivity model HOT 1
- NIRSTORM process('GetDescription') calls are terribly slow HOT 33
- Merging two files from left and right hemisphere of the type cMEM sources - HbO | avg(5.000s,20.000s)
- Issue with Import from Database - epoch time and baseline
- NIRSTORM Mini Course 2020 HOT 2
- Cat12 segmentation 5 tissue values HOT 3
- Brainstorm compilation issue HOT 1
- glm for different task duration HOT 2
- cplex error HOT 5
- How to cite NIRSTORM HOT 2
- image recon stats HOT 1
- Compute Voronoi volume-to-cortex interpolator (Again) HOT 1
- figure HOT 8
- Unable to download Colin27_4NIRS.zip HOT 1
- Saving Voronoi in the database is relatively slow HOT 1
- Unit test are not working
- [Smoothing] Compute head model from fluence
- Can't download cplex HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nirstorm.