orbithunter.core.Orbit._parse_parameters

Orbit._parse_parameters(parameters, **kwargs)[source]

Parse and set the parameters attribute.

Notes

Parameters are required to be of numerical type and are typically expected to be scalar values. If there are categorical parameters then they should be assigned to a different attribute. The reason for this is that in numerical optimization, the orbit_vector; the concatenation of self.state and self.parameters is sentf to the various algorithms. Cannot send categoricals to these algorithms.

Default is not to be constrained in any dimension; account for when constraints come from a class with fewer parameters by iterated over current labels, then assigning value from passed ‘constraints’ dict. When an expected constraint is not included, the associated parameter is assumed to be constrained.

The subclass essentially defines what is and is not a constant; conversion between classes (and passing constraints in the process) can mistakenly unconstrain these constants. Therefore, if the key is not in the default constraints dict then it is assumed to be constant. This is not an issue because this is one of the fundamental requirements for subclassing.