lsst.meas.base g683338f4e5+18aae10bc3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.base._id_generator.BaseIdGeneratorConfig Class Reference
Inheritance diagram for lsst.meas.base._id_generator.BaseIdGeneratorConfig:
lsst.meas.base._id_generator.DetectorExposureIdGeneratorConfig lsst.meas.base._id_generator.DetectorVisitIdGeneratorConfig lsst.meas.base._id_generator.SkyMapIdGeneratorConfig

Public Member Functions

def make_field (cls, doc="Configuration for how to generate catalog IDs from data IDs.")
 
IdGenerator apply (self, DataCoordinate data_id, **Any kwargs)
 

Static Public Attributes

 release_id
 
 n_releases
 

Detailed Description

Base class for configuration of `IdGenerator` instances.

This class is abstract (it cannot use `abc.ABCMeta` due 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 `IdGenerator` for usage.

Definition at line 55 of file _id_generator.py.

Member Function Documentation

◆ apply()

IdGenerator lsst.meas.base._id_generator.BaseIdGeneratorConfig.apply (   self,
DataCoordinate  data_id,
**Any  kwargs 
)
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 113 of file _id_generator.py.

◆ make_field()

def lsst.meas.base._id_generator.BaseIdGeneratorConfig.make_field (   cls,
  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.

Definition at line 87 of file _id_generator.py.

Member Data Documentation

◆ n_releases

lsst.meas.base._id_generator.BaseIdGeneratorConfig.n_releases
static
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 76 of file _id_generator.py.

◆ release_id

lsst.meas.base._id_generator.BaseIdGeneratorConfig.release_id
static
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 66 of file _id_generator.py.


The documentation for this class was generated from the following file: