This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

DRAFT

When an App is registered on Brainlife, a config.json is automatically created based on the info the App creator enter via the GUI. There are four types of parameters:

  • NUMBER

  • STRING

  • ENUM

  • BOOL

So, it is impossible to enter a list of int or a numpy nd.array for instance. So the values must be converted.

For now, we have decided not to read and convert Python dictionary, so the BL user won’t be able to give a dictionary as a parameter value.

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:

{
"param_notch_widths": "10, 15, 20"
}

It was decided to enter numpy.nd.array this way on BL to differentiate it from the way it was entered in the config.json.example when the App is run locally (see Parameters conversion).

In the Python file, we added:

if isinstance(config['param_notch_widths'], str):
    config['param_notch_widths'] = list(map(float, config['param_notch_widths'].split(', ')))
    config['param_notch_widths'] = np.array(config['param_notch_widths'])

Case of a slice

Case of a tuple

Case of a list of integers/floats

Cases when a parameter can be two types

  • No labels