gavo.stc.dm module¶
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.
- class gavo.stc.dm.AllSky(fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None)[source]¶
Bases:
_Geometry
- class gavo.stc.dm.Box(boxsize=None, center=None, fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None)[source]¶
Bases:
_Geometry
- class gavo.stc.dm.Circle(center=None, fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, radius=None, size=None, ucd=None)[source]¶
Bases:
_Geometry
- class gavo.stc.dm.Convex(fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None, vectors=())[source]¶
Bases:
_Geometry
- class gavo.stc.dm.CooWiggle(id=None, origUnit=None, ucd=None, values=())[source]¶
Bases:
_WiggleSpec
A wiggle given in coordinates.
The values attributes stores them just like coordinates are stored.
- inexactAttrs = {'values'}¶
- class gavo.stc.dm.CoordSys(id=None, libraryId=None, name=None, redshiftFrame=None, spaceFrame=None, spectralFrame=None, timeFrame=None, ucd=None)[source]¶
Bases:
ASTNode
is an astronomical coordinate system.
- class gavo.stc.dm.Difference(children=(), fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None)[source]¶
Bases:
_Compound
- class gavo.stc.dm.Ellipse(center=None, fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, posAngle=None, size=None, smajAxis=None, sminAxis=None, ucd=None)[source]¶
Bases:
_Geometry
- class gavo.stc.dm.Intersection(children=(), fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None)[source]¶
Bases:
_MultiOpCompound
- class gavo.stc.dm.MatrixWiggle(id=None, matrices=(), origUnit=None, ucd=None)[source]¶
Bases:
_WiggleSpec
A matrix for specifying wiggle.
The matrix/matrices are stored as sequences of sequences; see stcxgen._wrapMatrix for details.
- class gavo.stc.dm.Not(children=(), fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None)[source]¶
Bases:
_Compound
- class gavo.stc.dm.Polygon(fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None, vertices=())[source]¶
Bases:
_Geometry
- gavo.stc.dm.PositionInterval¶
alias of
SpaceInterval
- class gavo.stc.dm.RadiusWiggle(id=None, origUnit=None, radii=(), ucd=None)[source]¶
Bases:
_WiggleSpec
An wiggle given as a radius.
If unit adaption is necessary and the base value is a vector, the radii are assumed to be of the dimension of the first vector component.
- inexactAttrs = {'radii'}¶
- class gavo.stc.dm.RedshiftCoo(error=None, frame=None, id=None, name=None, pixSize=None, resolution=None, size=None, ucd=None, unit=None, value=None, velTimeUnit=None)[source]¶
Bases:
_Coordinate
,_RedshiftMixin
- class gavo.stc.dm.RedshiftFrame(dopplerDef=None, id=None, name=None, refPos=None, type=None, ucd=None)[source]¶
Bases:
_CoordFrame
- nDim = 1¶
- class gavo.stc.dm.RedshiftInterval(fillFactor=None, frame=None, id=None, lowerLimit=None, name=None, origUnit=None, ucd=None, upperLimit=None)[source]¶
Bases:
_CoordinateInterval
- cType¶
alias of
RedshiftType
- class gavo.stc.dm.RefPos(id=None, planetaryEphemeris=None, standardOrigin=None, ucd=None)[source]¶
Bases:
ASTNode
is a reference position.
Right now, this is just a wrapper for a RefPos id, as defined by STC-S, or None for Unknown.
- class gavo.stc.dm.STCSpec(areas=(), astroSystem=None, freq=None, freqAs=(), id=None, place=None, redshift=None, redshiftAs=(), systems=(), time=None, timeAs=(), ucd=None, velocity=None, velocityAs=())[source]¶
Bases:
ASTNode
is an STC specification, i.e., the root of an STC tree.
- binarize()[source]¶
returns self with any compound present brought to a binary tree.
This will return self if nothing needs to change.
- debinarize()[source]¶
returns self with any compound present brought to a binary tree.
This will return self if nothing needs to change.
- polish()[source]¶
does global fixups when parsing is finished.
This method has to be called after the element is complete. The standard parsers do this.
For convenience, it returns the instance itself.
- stripUnits()[source]¶
removes all unit specifications from this AST.
This is intended for non-standalone STC, e.g., in VOTables, where external unit specifications are present. Removing the units prevents “bleeding out” of conflicting in-STC specifications (that mostly enter through defaulting).
This ignores the immutability of nodes and is in general a major pain.
- property sys¶
- class gavo.stc.dm.SpaceCoo(epoch=None, error=None, frame=None, id=None, name=None, pixSize=None, resolution=None, size=None, ucd=None, unit=(), value=None, yearDef=None)[source]¶
Bases:
_Coordinate
,_SpatialMixin
- class gavo.stc.dm.SpaceFrame(equinox=None, flavor='SPHERICAL', id=None, nDim=None, name=None, refFrame=None, refPos=None, ucd=None)[source]¶
Bases:
_CoordFrame
- asTriple()[source]¶
returns a triple defining the space frame for spherc’s purposes.
This is for the computation of coordinate transforms. Since we only do coordinate transforms for spherical coordinate systems, this will, for now, raise STCValueErrors if everything but 2 or 3D SPHERICAL flavours. The other cases need more thought anyway.
- class gavo.stc.dm.SpaceInterval(fillFactor=None, frame=None, id=None, lowerLimit=None, name=None, origUnit=None, ucd=None, upperLimit=None)[source]¶
Bases:
_CoordinateInterval
- class gavo.stc.dm.SpectralCoo(error=None, frame=None, id=None, name=None, pixSize=None, resolution=None, size=None, ucd=None, unit=None, value=None)[source]¶
Bases:
_Coordinate
,_OneDMixin
- cType¶
alias of
SpectralType
- class gavo.stc.dm.SpectralFrame(id=None, name=None, refPos=None, ucd=None)[source]¶
Bases:
_CoordFrame
- nDim = 1¶
- class gavo.stc.dm.SpectralInterval(fillFactor=None, frame=None, id=None, lowerLimit=None, name=None, origUnit=None, ucd=None, upperLimit=None)[source]¶
Bases:
_CoordinateInterval
- cType¶
alias of
SpectralType
- class gavo.stc.dm.TimeCoo(error=None, frame=None, id=None, name=None, pixSize=None, resolution=None, size=None, ucd=None, unit=None, value=None)[source]¶
Bases:
_Coordinate
,_OneDMixin
- class gavo.stc.dm.TimeFrame(id=None, name=None, refPos=None, timeScale=None, ucd=None)[source]¶
Bases:
_CoordFrame
- nDim = 1¶
- class gavo.stc.dm.TimeInterval(fillFactor=None, frame=None, id=None, lowerLimit=None, name=None, origUnit=None, ucd=None, upperLimit=None)[source]¶
Bases:
_CoordinateInterval
- class gavo.stc.dm.Union(children=(), fillFactor=None, frame=None, geoColRef=None, id=None, name=None, origUnit=None, size=None, ucd=None)[source]¶
Bases:
_MultiOpCompound
- class gavo.stc.dm.VelocityCoo(epoch=None, error=None, frame=None, id=None, name=None, pixSize=None, resolution=None, size=None, ucd=None, unit=(), value=None, velTimeUnit=(), yearDef=None)[source]¶
Bases:
_Coordinate
,_VelocityMixin
- class gavo.stc.dm.VelocityInterval(fillFactor=None, frame=None, id=None, lowerLimit=None, name=None, origUnit=None, ucd=None, upperLimit=None)[source]¶
Bases:
_CoordinateInterval
- cType¶
alias of
VelocityType