gavo.stc.conform module

“Conforming” of STCSpecs, i.e., bringing one to the system and units of the other.

You can only conform STCSpecs rather than individual components, since usually you need the whole information for the transformation (e.g., space and time for velocities.

class gavo.stc.conform.SphercLoader[source]

Bases: object

A hack to delay loading of spherc.

We should probably use one of the many lazy import solutions and use it for both what we’re doing here and in coords.AstWCSLoader.

gavo.stc.conform.conform(baseSTC, sysSTC, **kwargs)[source]

returns baseSTC in the units and the system of sysSTC.

gavo.stc.conform.conformSystems(baseSTC, sysSTC, relativistic=False, slaComp=False)[source]

conforms places and velocities in fromSTC with toSTC including precession and reference frame fixing.

gavo.stc.conform.conformUnits(baseSTC, sysSTC)[source]

returns baseSTC in the units of sysSTC.

gavo.stc.conform.getSimple2Converter(srcSTC, destSTC, slaComp=True)[source]

returns a function that transforms lat and long in srcSTC to lat and long in destSTC.

srcSTC and destSTC are ASTs. Of course, all this only works if srcSTC and destSTC are both SPHER2-flavored.

gavo.stc.conform.iterSpatialChanges(baseSTC, sysSTC, slaComp=False)[source]

yields changes to baseSTC to bring places and velocities to the system and units of sysSTC.

sixTrans is a sphermath.SVConverter instance.

If the frame or units are not defined in sysSTC, there are taken from baseSTC.

gavo.stc.conform.iterTemporalChanges(baseSTC, sysSTC)[source]