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

Module dm

source code

Definition of the structure of the internal representation (the AST).

For now, we want to be able to capture what STC-S can do (and a bit more). This means that we do not support generic coordinates (yet), elements, xlink and all the other stuff.

Classes
  RefPos
is a reference position.
  TimeFrame
  SpaceFrame
  SpectralFrame
  RedshiftFrame
  CoordSys
is an astronomical coordinate system.
  SpectralType
  TimeType
  SpaceType
  RedshiftType
  VelocityType
  CooWiggle
A wiggle given in coordinates.
  RadiusWiggle
An wiggle given as a radius.
  MatrixWiggle
A matrix for specifying wiggle.
  SpaceCoo
  VelocityCoo
  RedshiftCoo
  TimeCoo
  SpectralCoo
  SpaceInterval
  PositionInterval
  VelocityInterval
  RedshiftInterval
  TimeInterval
  SpectralInterval
  AllSky
  Circle
  Ellipse
  Box
  Polygon
  Convex
  Union
  Intersection
  Difference
  Not
  STCSpec
is an STC specification, i.e., the root of an STC tree.
Functions
 
binarizeCompound(compound)
returns compound as a binary tree.
source code
 
debinarizeCompound(compound)
returns compound with flattened operators.
source code
 
fromPgSphere(refFrame, pgGeom)
Returns an AST for a pgsphere object as defined in utils.pgsphere.
source code
Variables
  NullRefPos = <RefPos >
  __package__ = 'gavo.stc'
Function Details

binarizeCompound(compound)

source code 

returns compound as a binary tree.

For unions and intersections, compounds consisting of more than two operands will be split up into parts of two arguments each.

fromPgSphere(refFrame, pgGeom)

source code 

Returns an AST for a pgsphere object as defined in utils.pgsphere.

This interprets the pgSphere box as a coordinate interval, which is wrong but probably what most VO protocols expect.