expandUniqueId¶
-
lsst.daf.butler.tests.
expandUniqueId
(butler: lsst.daf.butler._butler.Butler, partialId: collections.abc.Mapping[str, Any]) → lsst.daf.butler.core.dimensions._coordinate.DataCoordinate¶ Return a complete data ID matching some criterion.
Parameters: - butler :
lsst.daf.butler.Butler
The repository to query.
- partialId :
Mapping
[str
] 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. This function is only suitable for certain kinds of test repositories, and not for repositories intended for real data processing or analysis.
Examples
>>> butler = makeTestRepo( "testdir", {"instrument": ["notACam"], "detector": [1]}) >>> expandUniqueId(butler, {"detector": 1}) DataCoordinate({instrument, detector}, ('notACam', 1))
- butler :