Closed neumann-wj closed 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).
Ok, I will try it again!
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?
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...
https://github.com/neuromodulation/perceive/blob/45915ca36c8160e7d4e94bff99f91604757a8780/perceive_options.m#L73
I tried to run this branch today and got the following errors:
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();