neuromodulation / perceive

This repository contains MATLAB code to extract data from the Medtronic Percept bidirectional brain computer interface device for adaptive deep brain stimulation.
http://icneuromodulation.org
Apache License 2.0
35 stars 16 forks source link

Are local options mandatory? Some errors I encountered in this branch. #13

Closed neumann-wj closed 3 years ago

neumann-wj commented 3 years ago

https://github.com/neuromodulation/perceive/blob/45915ca36c8160e7d4e94bff99f91604757a8780/perceive_options.m#L73

I tried to run this branch today and got the following errors:

perceive Error using perceive_options (line 108) perceive_options: perceive_options_local.m was not present > generated in the current directory E:\OneDrive - Charité - Universitätsmedizin Berlin\Dokumente\Data_non_BIDS_data\PERCEPT\sub-011. Please review it, adapt according to your needs, but DO NOT COMMIT this file! Then, rerun perceive.

Error in perceive (line 55) popt = perceive_options();

After that I ran it again and it resulted in this error:

Dot indexing is not supported for variables of this type.

Error in pdisp (line 18) if level<=popt.verbosity

Error in perceive_options (line 71) pdisp('Error using local options, please check ''perceive_options_local.m''.');

Error in perceive (line 55) popt = perceive_options();

tsieger commented 3 years ago

Thanks for reporting. There was a bug in pdisp.m (sorry for that). It does not signal a problem with local options.

The bahaviour of generating local options is desired (and only happens once when no local options exist).

neumann-wj commented 3 years ago

Ok, I will try it again!

neumann-wj commented 3 years ago

Ok, awesome, it worked now. Although I do not quite understand why we would want to create it in cases where the user does not want to change any options? Also, maybe it would be nicer to have it in the perceive folder?

tsieger commented 3 years ago

When the user does not want to change any options, they would simply leave the local options empty. My motivation for local options was twofold: i) if there are only global options, the user would change them and unintentionally commit them affecting other users, ii) several versions of local options can be created serving the purpose of e.g. specific settings for specific data (e.g. you may want to routinely process data from one lab, but debug data from another lab, where you would need to increase the verbosity of messages and increase the number of open figures)

Local options get created in the directory where you run perceive from, usually the perceive folder itself. If, however, you have perceive on matlab path, you may run it from anywhere, and local options get created there. This is intended behaviour. You don't like it? I understand that some users would argue against creating local options in folders with data...