FakeDatasetRef¶
-
class
lsst.daf.butler.registry.interfaces.FakeDatasetRef¶ Bases:
objectA fake
DatasetRefthat can be used internally by butler where only the dataset ID is available.Should only be used when registry can not be used to create a full
DatasetReffrom the ID. A particular use case is during dataset deletion when solely the ID is available.Parameters: - id :
int The dataset ID.
Attributes Summary
componentsdatasetTypeidUnique integer that identifies this dataset. Methods Summary
allRefs(parents)Return all the nested component DatasetRefand optionally the parent.flatten(refs, *, parents)Recursively transform an iterable over FakeDatasetRefto include nested componentFakeDatasetRefinstances.getCheckedId()Return self.id.Attributes Documentation
-
components¶
-
datasetType¶
-
id¶ Unique integer that identifies this dataset.
Methods Documentation
-
allRefs(parents: bool = True) → Iterator[lsst.daf.butler.registry.interfaces._bridge.FakeDatasetRef]¶ Return all the nested component
DatasetRefand optionally the parent.Parameters: - parents :
bool, optional If
True(default) include the given datasets in the output iterable. IfFalse, include only their components. Since aFakeDatasetRefnever have components, setting this toFalsewill yield no results.
Yields: - ref :
FakeDatasetRef Since there are never components, this will either return itself or no results (depending on the value of
parents).
- parents :
-
static
flatten(refs: Iterable[lsst.daf.butler.registry.interfaces._bridge.FakeDatasetRef], *, parents: bool = True) → Iterator[lsst.daf.butler.registry.interfaces._bridge.FakeDatasetRef]¶ Recursively transform an iterable over
FakeDatasetRefto include nested componentFakeDatasetRefinstances.Parameters: - refs :
Iterable[FakeDatasetRef] Input iterable to process.
- parents :
bool, optional If
True(default) include the given datasets in the output iterable. IfFalse, include only their components, which forFakeDatasetRefmeans no results.
Yields: - ref :
DatasetRef Either one of the given
FakeDatasetRefinstances (only ifparentisTrue) or one of its (recursive) children.
Notes
If
parentsisTrue, components are guaranteed to be yielded before their parents.- refs :
- id :