TopologicalFamily

class lsst.daf.butler.TopologicalFamily(name: str, space: lsst.daf.butler.core._topology.TopologicalSpace)

Bases: abc.ABC

A grouping of TopologicalRelationshipEndpoint objects whose regions form a hierarchy in which one endpoint’s rows always contain another’s in a predefined way.

This hierarchy means that endpoints in the same family do not generally have to be have to be related using (e.g.) overlaps; instead, the regions from one “best” endpoint from each family are related to the best endpoint from each other family in a query.

Parameters:
name : str

Unique string identifier for this family.

category : TopologicalSpace

Space in which the regions of this family live.

Methods Summary

choose(endpoints) Select the best member of this family to use in a query join or data ID when more than one is present.

Methods Documentation

choose(endpoints: lsst.daf.butler.core.named.NamedValueAbstractSet[lsst.daf.butler.core._topology.TopologicalRelationshipEndpoint][lsst.daf.butler.core._topology.TopologicalRelationshipEndpoint]) → lsst.daf.butler.core._topology.TopologicalRelationshipEndpoint

Select the best member of this family to use in a query join or data ID when more than one is present.

Usually this should correspond to the most fine-grained region.

Parameters:
endpoints : NamedValueAbstractSet [TopologicalRelationshipEndpoint]

Endpoints to choose from. May include endpoints that are not members of this family (which should be ignored).

Returns:
best : TopologicalRelationshipEndpoint

The best endpoint that is both a member of self and in endpoints.