DatasetType¶
-
class
lsst.daf.butler.
DatasetType
(name, dataUnits, storageClass)¶ Bases:
object
A named category of Datasets that defines how they are organized, related, and stored.
A concrete, final class whose instances represent
DatasetType
s.DatasetType
instances may be constructed without aRegistry
, but they must be registered viaRegistry.registerDatasetType()
before corresponding Datasets may be added.DatasetType
instances are immutable.Parameters: - name :
str
A string name for the Dataset; must correspond to the same
DatasetType
across all Registries.- dataUnits :
iterable
ofstr
DataUnit
names that defines theDatasetRef
s corresponding to thisDatasetType
. The input iterable is copied into afrozenset
.- storageClass :
StorageClass
orstr
Instance of a
StorageClass
or name ofStorageClass
that defines how thisDatasetType
is persisted.
Attributes Summary
dataUnits
A frozenset
ofDataUnit
names that defines theDatasetRef
s corresponding to thisDatasetType
.name
A string name for the Dataset; must correspond to the same DatasetType
across all Registries.storageClass
StorageClass
instance that defines how thisDatasetType
is persisted.Methods Summary
component
()Component name (if defined) componentTypeName
(component)Given a component name, derive the datasetTypeName of that component isComposite
()Boolean indicating whether this DatasetType
is a composite type.nameWithComponent
(datasetTypeName, componentName)Form a valid DatasetTypeName from a parent and component. Attributes Documentation
-
dataUnits
¶ A
frozenset
ofDataUnit
names that defines theDatasetRef
s corresponding to thisDatasetType
.
-
name
¶ A string name for the Dataset; must correspond to the same
DatasetType
across all Registries.
-
storageClass
¶ StorageClass
instance that defines how thisDatasetType
is persisted. Note that if DatasetType was constructed with a name of a StorageClass then Butler has to be initialized before using this property.
Methods Documentation
-
component
()¶ Component name (if defined)
Returns: - comp :
str
Name of component part of DatasetType name.
None
if thisDatasetType
is not associated with a component.
- comp :
-
componentTypeName
(component)¶ Given a component name, derive the datasetTypeName of that component
Parameters: - component :
str
Name of component
Returns: - derived :
str
Compound name of this
DatasetType
and the component.
Raises: - KeyError
Requested component is not supported by this
DatasetType
.
- component :
-
isComposite
()¶ Boolean indicating whether this
DatasetType
is a composite type.Returns: - isComposite :
bool
True
if thisDatasetType
is a composite type,False
otherwise.
- isComposite :
- name :