BaseIdGeneratorConfig#
- class lsst.meas.base.BaseIdGeneratorConfig(*args, **kw)#
Bases:
ConfigBase class for configuration of
IdGeneratorinstances.This class is abstract (it cannot use
abc.ABCMetadue to a metaclass conflict), and it should mostly be considered an implementation detail of how the attributes it defines are included in its concrete derived classes. Derived classes must implemented_make_dimension_packer.See
IdGeneratorfor usage.Attributes Summary
Number of (contiguous, starting from zero)
release_idvalues to reserve space for.Identifier for a data release or other version to embed in generated IDs.
Methods Summary
apply(data_id, **kwargs)Construct an
IdGeneratorinstance from this configuration.make_field([doc])Return a config field that holds an instance of this class.
Attributes Documentation
- n_releases#
Number of (contiguous, starting from zero)
release_idvalues to reserve space for. One (not zero) is used to reserve no space. (int, default64)
- release_id#
Identifier for a data release or other version to embed in generated IDs. Zero is reserved for IDs with no embedded release identifier. (
int, default0)
Methods Documentation
- apply(data_id: DataCoordinate, **kwargs: Any) IdGenerator#
Construct an
IdGeneratorinstance from this configuration.Parameters#
- data_id
DataCoordinate The data ID the
IdGeneratorwill embed into all IDs. This generally must be a fully-expanded data ID (i.e. have dimension records attached), that identifies the “instrument” or “skymap” dimension, though this requirement may be relaxed for certain dimension packer types.- **kwargs
Additional keyword arguments are interpreted as dimension value pairs to include in the data ID. This may be used to provide constraints on dimensions for which records are not available.
Returns#
- id_generator
IdGenerator Object that generates integer IDs for catalogs and their rows by embedding the given data ID and a configurably-optional release ID.
Notes#
This method is called
applyfor consistency with the pattern of usinglsst.pex.config.ConfigurableFieldandlsst.pex.config.RegistryFieldto construct the objects whose configuration they hold. It doesn’t actually use those mechanisms because we have many config classes for the oneIdGeneratorclass, instead of the other way around, and as a result a “config as factory” approach works better.- data_id
- classmethod make_field(doc='Configuration for how to generate catalog IDs from data IDs.')#
Return a config field that holds an instance of this class.
Parameters#
- doc
str, optional Documentation for the config field. As this configuration almost always plays the same role in any parent config, the default is usually fine.
Returns#
- field
lsst.pex.config.ConfigField New config field for instances of this class.
Notes#
This method is provided as a convenience to reduce boilerplate downstream: it typically saves an import or two, and it allows the same usually-appropriate docstring to be reused instead of rewritten each time. It does not need to be used in order to use this config class.
- doc