addDataIdValue¶
- lsst.daf.butler.tests.addDataIdValue(butler: Butler, dimension: str, value: str | int, **related: str | int) None ¶
Add the records that back a new data ID to a repository.
- Parameters:
- butler
lsst.daf.butler.Butler
The repository to update.
- dimension
str
The name of the dimension to gain a new value.
- value
The value to register for the dimension.
- **related
Any existing dimensions to be linked to
value
.
- butler
Notes
Related dimensions (e.g., the instrument associated with a detector) may be specified using
related
, which requires a value for those dimensions to have been added to the repository already (generally with a previous call toaddDataIdValue
. Any dependencies of the given dimension that are not included inrelated
will be linked to existing values arbitrarily, and (for implied dependencies only) created and also inserted into the registry if they do not exist. Values for required dimensions and those given inrelated
are never created.Because this function creates filler data, it is only suitable for test repositories. It should not be used for repositories intended for real data processing or analysis, which have known dimension values.
Examples
See the guide on Creating and populating a repository for usage examples.