Parameters

Warning

This module is not mature

class byotrack.api.parameters.ParameterRange

Bases: ABC

Define a range of validity for parameters

abstract is_valid(parameter: object) bool

Check that the parameter’s value is in the validity range

abstract to_str() str

Returns a string describing the valid range

class byotrack.api.parameters.ParameterBound(low: float, high: float)

Bases: ParameterRange

Bounded parameters between low and high values

is_valid(parameter: object) bool

Check that the parameter’s value is in the validity range

to_str() str

Returns a string describing the valid range

class byotrack.api.parameters.ParameterEnum(values: Set)

Bases: ParameterRange

Parameters that can have only a set of predefined value

is_valid(parameter: object) bool

Check that the parameter’s value is in the validity range

to_str() str

Returns a string describing the valid range

class byotrack.api.parameters.ParametrizedObjectMixin

Bases: object

Objects with hyper parameters

The child classes have to define the parameters dict that describes all their parameters with a ParameterRange. When the instance tries to set a parameter value, this range is used to validate the value.

(See an implementation with SpotDetector)

parametrized

Registered child ParametrizedObjectMixin ParametrizedObjectMixin attributes are automatically registered.

Type:

Dict[str, ParametrizedObjectMixin]

parameters

Defined range for parameters

Type:

Dict[str, ParameterRange]