LSST Applications g2079a07aa2+3e9fd84d81,g20cdd03214+65cb528a1a,g2305ad1205+4b99ae9ecb,g2bbee38e9b+1cefa2a0d0,g337abbeb29+1cefa2a0d0,g3a166c0a6a+1cefa2a0d0,g4322eb9e3a+8cf9ea7557,g461a3dce89+585e252eca,g4e26c3aaff+07050c8710,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+7c7e7b1a51,g607f77f49a+65cb528a1a,g69c4c69b53+1cefa2a0d0,g858d7b2824+65cb528a1a,g8b7d742e89+7f34c93731,g99cad8db69+b56d74f630,g9ddcbc5298+9a081db1e4,ga1e77700b3+39b6e1549e,ga8d6e2f9c9+fa6751a380,gae0086650b+585e252eca,gb0e22166c9+0e73c8378f,gb7c702c636+64a045db41,gbb8dafda3b+8cc393fe87,gc120e1dc64+f66361de5c,gc28159a63d+1cefa2a0d0,gcdd4ae20e8+7905aa6503,gce60184219+65cb528a1a,gcf0d15dbbd+7905aa6503,gd1535ee943+83012351dc,gdaeeff99f8+f9a426f77a,ge79ae78c31+1cefa2a0d0,gf905fbdb4b+fdefd0a83d,gf907d663e3+4097b5f5cf,gfbcc870c63+b310236976,w.2024.25
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, doc, dtype=None, allowed=None, default=None, optional=True, deprecated=None) | |
Public Attributes | |
allowed | |
source | |
Protected Member Functions | |
_validateValue (self, value) | |
A configuration field (`~lsst.pex.config.Field` subclass) that allows a user to select from a predefined set of values. Use ``ChoiceField`` when a configuration can only take one of a predefined set of values. Each choice must be of the same type. Parameters ---------- doc : `str` Documentation string that describes the configuration field. dtype : class The type of the field's choices. For example, `str` or `int`. allowed : `dict` The allowed values. Keys are the allowed choices (of ``dtype``-type). Values are descriptions (`str`-type) of each choice. default : ``dtype``-type, optional The default value, which is of type ``dtype`` and one of the allowed choices. optional : `bool`, optional If `True`, this configuration field is *optional*. Default is `True`. deprecated : None 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 -------- ConfigChoiceField ConfigDictField ConfigField ConfigurableField DictField Field ListField RangeField RegistryField
Definition at line 34 of file choiceField.py.
lsst.pex.config.choiceField.ChoiceField.__init__ | ( | self, | |
doc, | |||
dtype = None, | |||
allowed = None, | |||
default = None, | |||
optional = True, | |||
deprecated = None ) |
Reimplemented from lsst.pex.config.config.Field.
Definition at line 72 of file choiceField.py.
|
protected |
Validate a value. Parameters ---------- value : object The value being validated. Raises ------ TypeError Raised if the value's type is incompatible with the field's ``dtype``. ValueError Raised if the value is rejected by the ``check`` method.
Reimplemented from lsst.pex.config.config.Field.
Definition at line 99 of file choiceField.py.
lsst.pex.config.choiceField.ChoiceField.allowed |
Definition at line 77 of file choiceField.py.
lsst.pex.config.choiceField.ChoiceField.source |
Definition at line 97 of file choiceField.py.