ConfigurableInstance¶
- class lsst.pex.config.ConfigurableInstance(config, field, at=None, label='default')¶
Bases:
Generic
[FieldTypeVar
]A retargetable configuration in a
ConfigurableField
that proxies aConfig
.- Parameters:
- config
Config
Config to proxy.
- field
ConfigurableField
Field to use.
- at
list
ofStackFrame
orNone
, optional Stack frame for history recording. Will be calculated if
None
.- label
str
, optional Label to use for history recording.
- config
Notes
ConfigurableInstance
implements__getattr__
and__setattr__
methods that forward to theConfig
it holds.ConfigurableInstance
adds aretarget
method.The actual
Config
instance is accessed using thevalue
property (e.g. to get its documentation). The associated configurable object (usually aTask
) is accessed using thetarget
property.Attributes Summary
The configuration class (read-only)
The targeted configurable (read-only).
The
ConfigClass
instance (lsst.pex.config.Config
-type, read-only).Methods Summary
apply
(*args, **kw)Call the configurable.
retarget
(target[, ConfigClass, at, label])Target a new configurable and ConfigClass.
Attributes Documentation
- ConfigClass¶
The configuration class (read-only)
- target¶
The targeted configurable (read-only).
- value¶
The
ConfigClass
instance (lsst.pex.config.Config
-type, read-only).
Methods Documentation
- apply(*args, **kw)¶
Call the configurable.
- Parameters:
Notes
In addition to the user-provided positional and keyword arguments, the configurable is also provided a keyword argument
config
with the value ofConfigurableInstance.value
.
- retarget(target, ConfigClass=None, at=None, label='retarget')¶
Target a new configurable and ConfigClass.