FullIdGenerator¶
- class lsst.meas.base.FullIdGenerator(dimension_packer: DimensionPacker, data_id: DataCoordinate, release_id: int = 0, n_releases: int = 64)¶
- Bases: - IdGenerator- The subclass of - IdGeneratorthat actually includes packed data IDs and release IDs in its generated IDs.- Parameters:
- dimension_packerlsst.daf.butler.DimensionPacker
- Object that packs data IDs into integers. 
- data_idlsst.daf.butler.DataCoordinate
- Data ID to embed in all generated IDs and random seeds. 
- release_idint, optional
- Release identifier to embed in generated IDs. 
- n_releasesint, optional
- Number of (contiguous, starting from zero) - release_idvalues to reserve space for. One (not zero) is used to reserve no space.
 
- dimension_packer
 - Notes - Instances of this class should usually be constructed via configuration instead of by calling the constructor directly; see - IdGeneratorfor details.- Attributes Summary - The integer identifier for the full catalog with this data ID, not just one of its rows ( - int).- The data ID that will be embedded in all generated IDs ( - DataCoordinate).- The release ID that will embedded in all generated IDs ( - int).- Methods Summary - arange(*args, **kwargs)- Generate an array of integer IDs for this catalog. - make_source_catalog(schema)- Construct a empty catalog object with an ID factory. - Construct a new - lsst.afw.table.IdFactoryfor this catalog.- unpacker_from_config(config, fixed)- Return a callable that unpacks the IDs generated by this class, from a config field. - unpacker_from_dimension_packer(dimension_packer)- Return a callable that unpacks the IDs generated by this class, from a - lsst.daf.butler.DimensionPackerinstance.- Attributes Documentation - catalog_id¶
 - data_id¶
- The data ID that will be embedded in all generated IDs ( - DataCoordinate).
 - Methods Documentation - arange(*args, **kwargs) ndarray¶
- Generate an array of integer IDs for this catalog. - All parameters are forwarded to - numpy.arangeto generate an array of per-catalog counter integers. These are then combined with the- catalog_id`to form the returned array.- The IDs generated by - arangewill be equivalent to those generated by- make_table_id_factory(and by extension,- make_source_catalog) only if the counter integers start with- 1, not- 0, because that’s what- IdFactorydoes.
 - make_source_catalog(schema: Schema) SourceCatalog¶
- Construct a empty catalog object with an ID factory. - This is a convenience function for the common pattern of calling - make_table_id_factory, constructing a- SourceTablefrom that, and then constructing an (empty)- SourceCatalogfrom that.
 - make_table_id_factory() IdFactory¶
- Construct a new - lsst.afw.table.IdFactoryfor this catalog.
 - classmethod unpacker_from_config(config: BaseIdGeneratorConfig, fixed: DataCoordinate) Callable[[int], tuple[lsst.daf.butler.dimensions._coordinate.DataCoordinate, int]]¶
- Return a callable that unpacks the IDs generated by this class, from a config field. - Parameters:
- configBaseIdGeneratorConfig
- Configuration for an ID generator. 
- fixedDataCoordinate
- Data ID identifying the dimensions that are considered fixed by the - IdGeneratorthat produced the IDs: usually just- instrumentor- skymap, depending on the configuration. For most configurations this will need to be a fully-expanded data ID.
 
- config
- Returns:
- unpacker
- Callable that takes a single - intargument (an ID generated by an identically-configured- IdGenerator) and returns a tuple of:
 
 - Notes - This method cannot be used on IDs generated without a data ID. 
 - classmethod unpacker_from_dimension_packer(dimension_packer: DimensionPacker, n_releases: int = 64) Callable[[int], tuple[int, lsst.daf.butler.dimensions._coordinate.DataCoordinate, int]]¶
- Return a callable that unpacks the IDs generated by this class, from a - lsst.daf.butler.DimensionPackerinstance.- Parameters:
- dimension_packerlsst.daf.butler.DimensionPacker
- Dimension packer used to construct the original - DimensionPackerIdGenerator.
- n_releasesint, optional
- Number of (contiguous, starting from zero) - release_idvalues to reserve space for. One (not zero) is used to reserve no space.
 
- dimension_packer
- Returns:
- unpacker
- Callable that takes a single - intargument (an ID generated by an identically-constructed- DimensionPackerIdGenerator) and returns a tuple of:
 
 - Notes - This method cannot be used on IDs generated with no data ID.