ExposureIdInfo

class lsst.obs.base.ExposureIdInfo(*args, **kwargs)

Bases: object

Struct representing an exposure ID and the number of bits it uses.

Parameters:
expIdint

Exposure ID. Note that this is typically the ID of an afw.image.Exposure, not the ID of an actual observation, and hence it usually either includes a detector component or is derived from SkyMap IDs, and the observation ID component usually represents a visit rather than exposure. For code using the Gen3 butler, this will usually be obtained via a DimensionPacker (see example below).

expBitsint

Maximum number of bits allowed for exposure IDs of this type.

maxBitsint, optional

Maximum number of bits available for values that combine exposure ID with other information, such as source ID. If not provided (recommended when possible), unusedBits will be computed by assuming the full ID must fit an an lsst.afw.table RecordId field.

Deprecated since version v26: Deprecated in favor of lsst.meas.base.CatalogIdPacker; will be removed after v27.

Attributes Summary

unusedBits

Maximum number of bits available for non-exposure info (int).

Methods Summary

fromDataId(dataId[, name, maxBits])

Construct an instance from a fully-expanded data ID.

makeSourceIdFactory()

Make a lsst.afw.table.SourceTable.IdFactory instance from this exposure information.

Attributes Documentation

unusedBits

Maximum number of bits available for non-exposure info (int).

Methods Documentation

classmethod fromDataId(dataId: DataCoordinate, name: str = 'visit_detector', maxBits: int | None = None) ExposureIdInfo

Construct an instance from a fully-expanded data ID.

Parameters:
dataIdlsst.daf.butler.DataCoordinate

An expanded data ID that identifies the dimensions to be packed and contains extra information about the maximum values for those dimensions. An expanded data ID can be obtained from Registry.expandDataId, but all data IDs passed to PipelineTask methods should already be expanded.

namestr, optional

Name of the packer to use. The set of available packers can be found in the data repository’s dimension configuration (see the “packers” section of dimensions.yaml in daf_butler for the defaults).

maxBitsint, optional

Forwarded as the __init__ parameter of the same name. Should usually be unnecessary.

Returns:
infoExposureIdInfo

An ExposureIdInfo instance.

makeSourceIdFactory() IdFactory

Make a lsst.afw.table.SourceTable.IdFactory instance from this exposure information.

Returns:
idFactorylsst.afw.table.SourceTable.IdFactory

An ID factory that generates new IDs that fold in the image IDs managed by this object.