Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For now, we have decided not to read and convert Python dictionaries, so the BL user won’t be able to give a dictionary as a parameter value. However, he can use a dictionary if he uses the App locally (see https://icm-institute.atlassian.net/wiki/pages/resumedraft.action?draftId=1562771457).

Python dictionaries are used in app-temporal-filtering to define optionally the parameters of an IIR filter, but also in app-make-epochs to define the threshold values for each type of channel to use to detect bad channels. So, it is important to find a way to make possible to use dictionaries on BL.

Case of a numpy.nd.array

It is impossible to enter a np.nd.array in BL. So we register such parameter as a STRING and ask the user to enter floats separated by a comma: 10, 15, 20. In the config.json, such parameter will be written as:

...

If you want to convert it into a list of floats or ints, just replace str in list(map(str, picks.split(', '))) by the type you want.

If the list is empty, the user must enter []. In the Python code it will be converted into an empty list:

Code Block
if config['param_extended_proj'] == '[]':
    config['param_extended_proj'] = [] 

Cases when a parameter can be two types

...