lsst.daf.butler¶
This module provides an abstracted data access interface.
Python API reference¶
lsst.daf.butler Package¶
Data Access Butler
Functions¶
disableWhenLimited(func) | 
Decorator that indicates that a method should raise NotImplementedError on Registries whose limited attribute is True. | 
makeBoxWcsRegion(box, wcs, margin) | 
Construct a spherical ConvexPolygon from a WCS and a bounding box. | 
Classes¶
Butler([config, collection, run]) | 
Main entry point for the data access system. | 
ButlerConfig([other]) | 
Contains the configuration for a Butler | 
CompositeAssembler(storageClass) | 
Class for providing assembler and disassembler support for composites. | 
CompositesConfig([other, validate, …]) | 
|
CompositesMap(config) | 
Determine whether a specific datasetType or StorageClass should be disassembled. | 
Config([other]) | 
Implements a datatype that is used by Butler for configuration parameters. | 
ConfigSubset([other, validate, …]) | 
Config representing a subset of a more general configuration. | 
DataUnit(name, requiredDependencies, …[, …]) | 
A discrete abstract unit of data that can be associated with metadata and used to label datasets. | 
DataUnitConfig([other, validate, …]) | 
|
DataUnitRegistry() | 
Instances of this class keep track of DataUnit relations. | 
DatabaseDict(config, types, key, value) | 
An abstract base class for dict-like objects with a specific key type and namedtuple values, backed by a database. | 
DatasetComponent(name, storageClass, component) | 
Component of a dataset and associated information. | 
DatasetOriginInfo | 
Interface for classes providing collection information for pre-flight. | 
DatasetOriginInfoDef(defaultInputs, …[, …]) | 
Default implementation of the DatasetOriginInfo. | 
DatasetRef(datasetType, dataId[, id, run]) | 
Reference to a Dataset in a Registry. | 
DatasetType(name, dataUnits, storageClass) | 
A named category of Datasets that defines how they are organized, related, and stored. | 
DatasetTypeNotSupportedError | 
A DatasetType is not handled by this routine. | 
Datastore(config, registry) | 
Datastore interface. | 
DatastoreConfig([other, validate, …]) | 
|
FileDescriptor(location, storageClass[, …]) | 
Describes a particular file. | 
FileTemplate(template) | 
Format a path template into a fully expanded path. | 
FileTemplates(config[, default]) | 
Collection of FileTemplate templates. | 
FileTemplatesConfig([other]) | 
Configuration information for FileTemplates | 
Formatter | 
Interface for reading and writing Datasets with a particular StorageClass. | 
FormatterFactory() | 
Factory for Formatter instances. | 
Location(datastoreRoot, uri) | 
Identifies a location in the Datastore. | 
LocationFactory(datastoreRoot) | 
Factory for Location instances. | 
MappingFactory(refType) | 
Register the mapping of some key to a python type and retrieve instances. | 
PreFlightUnitsRow(dataId, datasetRefs) | 
Simple data class holding combination of DataUnit values for one row returned by pre-flight solver. | 
Quantum(task, run, *args, **kwargs) | 
A discrete unit of work that may depend on one or more datasets and produces one or more datasets. | 
Registry(registryConfig[, schemaConfig, …]) | 
Registry interface. | 
RegistryConfig([other, validate, …]) | 
|
Run(collection[, environment, pipeline]) | 
Represent a processing run. | 
Schema([config, limited]) | 
The SQL schema for a Butler Registry. | 
SchemaBuilder(config[, limited]) | 
Builds a Schema step-by-step. | 
SchemaConfig([other, validate, …]) | 
|
StorageClass([name, pytype, components, …]) | 
Class describing how a label maps to a particular Python type. | 
StorageClassConfig([other, validate, …]) | 
|
StorageClassFactory([config]) | 
Factory for StorageClass instances. | 
StoredFileInfo(formatter, path, storageClass) | 
Information associated with a stored file in a Datastore. | 
Class Inheritance Diagram¶
Example Datastores¶
lsst.daf.butler.datastores.posixDatastore Module¶
POSIX datastore.
Classes¶
PosixDatastore(config, registry) | 
Basic POSIX filesystem backed Datastore. | 
Class Inheritance Diagram¶
lsst.daf.butler.datastores.inMemoryDatastore Module¶
In-memory datastore.
Classes¶
StoredItemInfo(timestamp, storageClass[, …]) | 
Internal Metadata associated with a DatasetRef. | 
InMemoryDatastore(config[, registry]) | 
Basic Datastore for writing to an in memory cache. | 
Class Inheritance Diagram¶
lsst.daf.butler.datastores.chainedDatastore Module¶
Chained datastore.
Classes¶
ChainedDatastore(config[, registry]) | 
Chained Datastores to allow read and writes from multiple datastores. | 
Class Inheritance Diagram¶
Example Registries¶
lsst.daf.butler.registries.sqlRegistry Module¶
Classes¶
SqlRegistryConfig([other, validate, …]) | 
|
SqlRegistry(registryConfig, schemaConfig, …) | 
Registry backed by a SQL database. | 
Class Inheritance Diagram¶
Example Formatters¶
lsst.daf.butler.formatters.fileFormatter Module¶
Support for reading and writing files to a POSIX file system.
Classes¶
FileFormatter | 
Interface for reading and writing files on a POSIX file system. | 
Class Inheritance Diagram¶
lsst.daf.butler.formatters.jsonFormatter Module¶
Classes¶
JsonFormatter | 
Interface for reading and writing Python objects to and from JSON files. | 
Class Inheritance Diagram¶
lsst.daf.butler.formatters.yamlFormatter Module¶
Classes¶
YamlFormatter | 
Interface for reading and writing Python objects to and from YAML files. | 
Class Inheritance Diagram¶
lsst.daf.butler.formatters.pickleFormatter Module¶
Formatter associated with Python pickled objects.
Classes¶
PickleFormatter | 
Interface for reading and writing Python objects to and from pickle files. | 
Class Inheritance Diagram¶
Support API¶
lsst.daf.butler.core.safeFileIo Module¶
Utilities for safe file IO
Functions¶
safeMakeDir(directory) | 
Make a directory in a manner avoiding race conditions | 
setFileMode(filename) | 
Set a file mode according to the user’s umask | 
FileForWriteOnceCompareSame(name) | 
Context manager to get a file that can be written only once and all other writes will succeed only if they match the initial write. | 
SafeFile(name) | 
Context manager to create a file in a manner avoiding race conditions | 
SafeFilename(name) | 
Context manager for creating a file in a manner avoiding race conditions. | 
SafeLockedFileForRead(name) | 
Context manager for reading a file that may be locked with an exclusive lock via SafeLockedFileForWrite. | 
Classes¶
DoNotWrite | 
|
FileForWriteOnceCompareSameFailure | 
|
SafeLockedFileForWrite(name) | 
File-like object that is used to create a file if needed, lock it with an exclusive lock, and contain file descriptors to readable and writable versions of the file. | 
Class Inheritance Diagram¶
lsst.daf.butler.core.utils Module¶
Functions¶
iterable(a) | 
Make input iterable. | 
allSlots(self) | 
Return combined __slots__ for all classes in objects mro. | 
slotValuesAreEqual(self, other) | 
Test for equality by the contents of all slots, including those of its parents. | 
slotValuesToHash(self) | 
Generate a hash from slot values. | 
getFullTypeName(cls) | 
Return full type name of the supplied entity. | 
getInstanceOf(typeOrName) | 
Given the type name or a type, instantiate an object of that type. | 
transactional(func) | 
Decorator that wraps a method and makes it transactional. | 
getObjectSize(obj[, seen]) | 
Recursively finds size of objects. | 
stripIfNotNone(s) | 
Strip leading and trailing whitespace if the given object is not None. | 
Classes¶
Singleton | 
Metaclass to convert a class to a Singleton. | 
TopologicalSet(elements) | 
A collection that behaves like a builtin set, but where elements can be interconnected (like a graph). | 
TopologicalSetNode(element, sourceElements) |