Package gavo :: Package stc :: Module eq
[frames] | no frames]

Module eq

source code

Determining equivalence for STC systems.

Frequenently, one needs to decide if two systems are "close enough" to work together, e.g., when building geometries or for ADQL geometry predicates. This code lets you define matching policies.

Classes
  EquivalenceCondition
A base class for EquivalencePolicy elements.
  KeysEquivalent
An equivalence condition specifying a certain key being equal if non-None in both objects.
  RefFramesEquivalent
An equivalence condition tailored for reference frames.
  EquivalencePolicy
A policy specifying when two STC system objects are considered equivalent.
Functions
 
makeKeyGetter(*args)
returns a function getting key from an object.
source code
Variables
  defaultPolicy = <gavo.stc.eq.EquivalencePolicy object>
  __package__ = 'gavo.stc'
Function Details

makeKeyGetter(*args)

source code 

returns a function getting key from an object.

key is dot-seperated sequence of python identifiers (this is checked; a ValueError is raised at generation time for malformed keys).

This function is used to generate functions accessing parts of STC trees. If any attribute within key does not exist, the generated functions return None.

Decorators:
  • @utils.memoized