|
| | make_field (cls, doc="Configuration for how to generate catalog IDs from data IDs.") |
| |
| IdGenerator | apply (self, DataCoordinate data_id, **Any kwargs) |
| |
Configuration class for generating integer IDs from
``{visit, detector}`` data IDs.
See `IdGenerator` for usage.
Definition at line 185 of file _id_generator.py.
◆ _make_dimension_packer()
| DimensionPacker lsst.meas.base._id_generator.DetectorVisitIdGeneratorConfig._make_dimension_packer |
( |
| self, |
|
|
DataCoordinate | data_id ) |
|
protected |
Abstract hook for building a dimension packer from configuration.
Parameters
----------
data_id : `DataCoordinate`
The data ID the `IdGenerator` will 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.
Returns
-------
packer : `lsst.daf.butler.DimensionPacker`
Object that packs data IDs into integers.
Reimplemented from lsst.meas.base._id_generator.BaseIdGeneratorConfig.
Definition at line 194 of file _id_generator.py.
◆ apply()
| IdGenerator lsst.meas.base._id_generator.BaseIdGeneratorConfig.apply |
( |
| self, |
|
|
DataCoordinate | data_id, |
|
|
**Any | kwargs ) |
|
inherited |
Construct an `IdGenerator` instance from this configuration.
Parameters
----------
data_id : `DataCoordinate`
The data ID the `IdGenerator` will 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 `apply` for consistency with the pattern of using
`lsst.pex.config.ConfigurableField` and `lsst.pex.config.RegistryField`
to construct the objects whose configuration they hold. It doesn't
actually use those mechanisms because we have many config classes for
the one `IdGenerator` class, instead of the other way around, and as a
result a "config as factory" approach works better.
Definition at line 112 of file _id_generator.py.
◆ make_field()
| lsst.meas.base._id_generator.BaseIdGeneratorConfig.make_field |
( |
| cls, |
|
|
| doc = "Configuration for how to generate catalog IDs from data IDs." ) |
|
inherited |
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.
Definition at line 86 of file _id_generator.py.
◆ n_releases
| lsst.meas.base._id_generator.BaseIdGeneratorConfig.n_releases |
|
staticinherited |
Initial value:= Field(
doc=(
"Number of (contiguous, starting from zero) `release_id` values to reserve space for. "
"One (not zero) is used to reserve no space."
),
dtype=int,
default=DEFAULT_N_RELEASES,
check=lambda x: x > 0,
)
Definition at line 75 of file _id_generator.py.
◆ packer
| lsst.meas.base._id_generator.DetectorVisitIdGeneratorConfig.packer = Instrument.make_dimension_packer_config_field() |
|
static |
◆ release_id
| lsst.meas.base._id_generator.BaseIdGeneratorConfig.release_id |
|
staticinherited |
Initial value:= Field(
doc=(
"Identifier for a data release or other version to embed in generated IDs. "
"Zero is reserved for IDs with no embedded release identifier."
),
dtype=int,
default=DEFAULT_RELEASE_ID,
check=lambda x: x >= 0,
)
Definition at line 65 of file _id_generator.py.
The documentation for this class was generated from the following file: