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

cplex error #183

Closed
AlexBo924 opened this issue Nov 2, 2021 · 5 comments
Closed

cplex error #183

AlexBo924 opened this issue Nov 2, 2021 · 5 comments

Comments

@AlexBo924
Copy link

Hello Edouard,

I've been receiving an error for the CPLEX calculation of the optimal montage since I made the update to the new version of nirstorm.

I tried using the optimal montage tutorial and I get the same error.

I use CPLEX 12.8 (which use to work before), but according to the error I might need 12.3 ?

I tried also with the latest version of CPLEX, but no luck. As for 12.3 it is no longer available for download on the IBM website.

Any help on your free time would be appreciate it

Thanks

Capture1

Capture2

@Edouard2laire
Copy link
Collaborator

Thanks for the feedback. I'll try to installl the new version on my side too. In the mean time, could you let me know that does the following commands return :

cplx = Cplex();
cplex_version = nst_strsplit(cplx.getVersion(), '.')
length(cplex_version) 
str2double(cplex_version(1))

@Edouard2laire
Copy link
Collaborator

Edouard2laire commented Nov 2, 2021

Hi,
0d63931 should fix the issue. Please update NIRSTORM and try again :)

@AlexBo924
Copy link
Author

Hello Edouard,

Thank you for the quick reply, I ran first your script and this error came back:

Undefined function or variable 'nst_strsplit'

Then I updated NIRSTORM and run the OM (same parameter as before) and this error came up.

Capture

I was finally able to get my hands on version 12.3, however it does not run on windows 10 only windows 7 and it doesn't seem to have the matlab file needed to include in matlab for the OM to run, I still need to try though. If ever its possible to make it run on newer version such as 12.8 would be great (12.8 contain the matlab file needed for matlab).

Than you Edouard

@Edouard2laire
Copy link
Collaborator

Edouard2laire commented Nov 3, 2021

The code should work with the new version of CPLEX (12.8).

yes, i just saw i forgot to push some changes:

line 112-113 (https://github.com/Nirstorm/nirstorm/blob/master/bst_plugin/OM/process_nst_OM.m#L112-L113)

    i_atlas_head = strcmp({sHead.Atlas.Name},optionsAtlas_head);
    i_scout_head = strcmp({sHead.Atlas(i_atlas_head).Scouts.Label}, optionsROI_head);

should be replaced by:

    i_atlas_head = strcmp({sHead.Atlas.Name},options.Atlas_head);
    i_scout_head = strcmp({sHead.Atlas(i_atlas_head).Scouts.Label}, options.ROI_head);

I will merge it next week along with other changes. but you can already make the fix locally.

However, in your case, as you are not putting constraints on the localization of the optodes on the head, you should not select "FluenceRegion" and "FluenceExclude" as a head scout but check the "Use default search space" button.
Using FluenceRegion as a region would work too but is way too computationally expensive as you would need to compute the sensitivity to the ROI for all vertex of the head when you know that the montage should be "above" the ROI. That's why when selecting default search space, you will only look for a region 4 or 5cm away from the ROI.

@AlexBo924
Copy link
Author

Thank you Edouard, indeed it works now.

You were right also for the constrain, take way less time with the default search space.

Thanks again, really appreciate it

Alex

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

2 participants