DatasetExistence

class lsst.daf.butler.DatasetExistence(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Flag

Flags representing the different states that a dataset can have in a Butler repository.

If a flag evaluates to True that will indicate that a dataset is present in the Butler repository. The different states for KNOWN and VERIFIED both evaluate to True and differ solely on whether the artifact was checked to make sure it exists or not.

Some flag are combinations of other flags, so in order to determine whether a dataset is present in datastore it is necessary to use logical AND.

exists = DatasetExistence.VERIFIED
if (DatasetExistence.DATASTORE & exists) == DatasetExistence.DATASTORE:
    # The datastore knows about this dataset.

Attributes Summary

DATASTORE

Known to the datastore.

KNOWN

The dataset is known to registry and datastore.

RECORDED

Known to registry or equivalent.

UNRECOGNIZED

The dataset is not recognized as part of this registry or datastore.

VERIFIED

The dataset is known to registry and datastore and the presence of the artifact has been verified.

Attributes Documentation

DATASTORE = 2

Known to the datastore.

Evaluates to False in Boolean context.

KNOWN = 11

The dataset is known to registry and datastore. The presence of the artifact in datastore has not been verified.

Evaluates to True in Boolean context.

RECORDED = 1

Known to registry or equivalent.

Evaluates to False in Boolean context.

UNRECOGNIZED = 0

The dataset is not recognized as part of this registry or datastore.

Evaluates to False in Boolean context.

VERIFIED = 7

The dataset is known to registry and datastore and the presence of the artifact has been verified.

Evaluates to True in Boolean context.