DimensionElement

class lsst.daf.butler.DimensionElement(universe, name, hasRegion, links, required, implied, 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).
name Name of this dimension (str, read-only).
universe The graph of all dimensions compatible with self (DimensionGraph).

Methods Summary

dependencies([required, implied]) Return the set of dimensions this dimension depends on.
graph([implied]) Return the minimal DimensionGraph that contains self.
links([expand, implied]) Return the names of fields that uniquely identify this dimension in a data ID dict.

Attributes Documentation

doc

Documentation for this dimension (str).

hasRegion

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

name

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

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

universe

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

Methods Documentation

dependencies(required=True, implied=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.

implied : bool

If True, return implied dependencies.

Returns:
dependencies : DimensionSet
graph(implied=False)

Return the minimal DimensionGraph that contains self.

Parameters:
implied : bool

If True, include implied as well as required dependencies.

Returns:
graph : DimensionGraph

Return the names of fields that uniquely identify this dimension in a data ID dict.

Parameters:
expand: `bool`

If True (default) include links associated with required dependencies.

implied: `bool`

If True, expand to include the links of implied dpendencies as well. Ignored if expand is False.

Returns:
links : frozenset of str

Set of field names.