If you need to add a new parameter, you can either do so by explicitly instantiating the associated classes, or by appending to the YAML files shipped with the code. The former makes sense if you need the parameter only in your local script, while the latter is the preferred method for contributing to the official repository.
Parameters are created – along with their names and description – automatically if they are present in the file parameters_metadata.yml. Entries have the form
Note the two spaces in front of the second and third line.
You should also add a default numerical value by appending to parameters_uncorrelated.yml, for instance,
The right-hand side can be either just a number (for parameters without
uncertainty) or a central value with one or several uncertainties. For symmetric
Gaussian errors, the notations 0.123(45)
, 0.123 +- 0.045
, and 0.123 ± 0.045
are equivalent.
The same effect as in the example above can be achieved programatically with the following lines of code,