expandUniqueId¶
-
lsst.daf.butler.tests.
expandUniqueId
(butler, partialId)¶ Return a complete data ID matching some criterion.
Parameters: - butler :
lsst.daf.butler.Butler
The repository to query.
- partialId :
Mapping
[str
, any] A mapping of known dimensions and values.
Returns: - dataId :
lsst.daf.butler.DataCoordinate
The unique data ID that matches
partialId
.
Raises: - ValueError
Raised if
partialId
does not uniquely identify a data ID.
Notes
This method will only work correctly if all dimensions attached to the target dimension (eg., “physical_filter” for “visit”) are known to the repository, even if they’re not needed to identify a dataset.
Examples
>>> butler = makeTestRepo( "testdir", {"instrument": ["notACam"], "detector": [1]}) >>> expandUniqueId(butler, {"detector": 1}) DataCoordinate({instrument, detector}, ('notACam', 1))
- butler :