RangeField#

class lsst.pex.config.RangeField(doc, dtype, default=None, optional=False, min=None, max=None, inclusiveMin=True, inclusiveMax=False, deprecated=None)#

Bases: Field

A configuration field (lsst.pex.config.Field subclass) that requires the value to be in a specific numeric range.

Parameters#

docstr

A description of the field.

dtype{int-type, float-type}

The field’s data type: either the int or float type.

defaultint or float, optional

Default value for the field.

optionalbool, optional

When False, lsst.pex.config.Config.validate will fail if the field’s value is None.

minint, float, or None, optional

Minimum value accepted in the range. If None, the range has no lower bound (equivalent to negative infinity).

maxint, float, or None, optional

Maximum value accepted in the range. If None, the range has no upper bound (equivalent to positive infinity).

inclusiveMinbool, optional

If True, the min value is included in the allowed range.

inclusiveMaxbool, optional

If True, the max value is included in the allowed range.

deprecatedNone or str, optional

A description of why this Field is deprecated, including removal date. If not None, the string is appended to the docstring for this Field.

See Also#

ChoiceField ConfigChoiceField ConfigDictField ConfigField ConfigurableField DictField Field ListField RegistryField

Attributes Summary

supportedTypes

The set of data types allowed by RangeField instances (set containing int and float types).

Attributes Documentation

supportedTypes = {<class 'float'>, <class 'int'>}#

The set of data types allowed by RangeField instances (set containing int and float types).