I’ve just merged (just prior to w_2023_17
) DM-31924, which implements RFC-785 and revamps how pipeline code generates integer IDs for sources, objects, {visit, detector}
data IDs, and {tract, patch, [band]}
data IDs.
You can find docs here and here. See those for the new pattern for how to construct an IdGenreator
.
Once you have one, the ExposureIdInfo.expId
property is more or less equivalent IdGenerator.catalog_id
(since usually this is in the context of an ID for a whole catalog dataset, and “exposure” is both heavily overloaded and inappropriate for coadds). The ExposureIdInfo.makeSourceIdFactory
method has been replaced by IdGenerator.make_table_id_factory
, but there’s also a make_source_catalog
method that may be more convenient. For new tasks that want to make astropy or pandas tables, there’s also an arange
method that works like its numpy namesake.
IdGenerator
(as the only thing that knows about a data ID that’s passed to most task run
method) also has a __str__
implementation that will display that data ID for use in logs.
Finally, IdGenerator
also provides a way to unpack the integer IDs it produces (see the docs linked above), which is something we’ve long promised but never delivered. This will become more important shortly with DM-38688, which will make the packed {visit, detector}
IDs for most Rubin instruments essentially impossible to unpack by-eye anymore, in order to free up some bits.