addDataIdValue

lsst.daf.butler.tests.addDataIdValue(butler: lsst.daf.butler._butler.Butler, dimension: str, value: Union[str, int], **related)

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.

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 to addDataIdValue. Any dependencies of the given dimension that are not included in related 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 in related 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.