FileTemplates

class lsst.daf.butler.FileTemplates(config, default=None)

Bases: object

Collection of FileTemplate templates.

Parameters:
config : FileTemplatesConfig or str

Load configuration.

default : str, optional

If not None, a default template to use if no template has been specified explicitly in the configuration.

Methods Summary

getTemplate(entity) Retrieve the FileTemplate associated with the dataset type.

Methods Documentation

getTemplate(entity)

Retrieve the FileTemplate associated with the dataset type.

If the lookup name corresponds to a component the base name for the component will be examined if the full component name does not match.

Parameters:
entity : DatasetType, DatasetRef, or StorageClass

Instance to use to look for a corresponding template. A DatasetType name or a StorageClass name will be used depending on the supplied entity. Priority is given to a DatasetType name.

Returns:
template : FileTemplate

Template instance to use with that dataset type.

Raises:
KeyError

No template could be located for this Dataset type.