DimensionElement

class lsst.daf.butler.DimensionElement(universe, name, hasRegion, link, required, optional, doc)

Bases: object

Base class for elements in the dimension schema.

DimensionElement has exactly two subclasses: Dimension and DimensionJoin.

DimensionElement objects are not directly constructable; they can only be obtained (possibly indirectly) from a special “universe” DimensionGraph loaded from configuration.

Attributes Summary

doc Documentation for this dimension (str).
hasRegion Whether this dimension is associated with a region on the sky (bool).
link Primary key fields that are used only by this dimension, not any dependencies (frozenset of str).
name Name of this dimension (str, read-only).
primaryKey The names of fields that uniquely identify this dimension in a data ID dict (frozenset of str).
universe The graph of all dimensions compatible with self (DimensionGraph).

Methods Summary

dependencies([required, optional]) Return the set of dimensions this dimension depends on.
graph([optional]) Return the minimal DimensionGraph that contains self.

Attributes Documentation

doc

Documentation for this dimension (str).

hasRegion

Whether this dimension is associated with a region on the sky (bool).

Primary key fields that are used only by this dimension, not any dependencies (frozenset of str).

name

Name of this dimension (str, read-only).

Also assumed to be the name of any associated table or view.

primaryKey

The names of fields that uniquely identify this dimension in a data ID dict (frozenset of str).

universe

The graph of all dimensions compatible with self (DimensionGraph).

Methods Documentation

dependencies(required=True, optional=False)

Return the set of dimensions this dimension depends on.

Parameters:
required : bool

If True (default), include required dependencies. Required dependences are always expanded recursively.

optional : bool

If True, return optional dependencies.

Returns:
dependencies : DimensionSet
graph(optional=False)

Return the minimal DimensionGraph that contains self.

Parameters:
optional : bool

If True, include optional as well as required dependencies.

Returns:
graph : DimensionGraph