Defaults need better implementation
Default values for most capabilities of any CTAP_*
function are hard to find, hard to understand, often incomplete and overall quite chaotic.
Proposition: create a separate function to match every CTAP_*
function, which compiles ALL default values, handles input, and returns both the required defaults for a given function, and a human readable formatting of default options. inputParser
should be able to handle this, since its functionality has improved. E.g. the field KeepUnmatched
can be set to true, which allows unmatched parameters to be entered and passed to called functions, emulating the ...
three dots of R. Also, the UsingDefaults
field contains those parameters for which an argument was not passed, allowing us to see what arguments the user has changed or not changed.
Thus, these functions can be substituted for the existing solutions (usually but not always the sbf_check_input
function inside each ctapeeg_*
function: exceptions are were no ctapeeg_*
exists for a given CTAP_*
). The usage would be that users call the function from command line when writing their pipeline, to see what the options are. Then CTAP_*
calls the function to get a required subset of fields for the requested method, and passes to ctapeeg_*
(if it calls such).