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

Module spherc

source code

Spherical sky coordinates and helpers.

Functions
 
tupleMin(t1, t2)
returns the element-wise minimum of two tuples:
source code
 
tupleMax(t1, t2)
returns the element-wise maximum of two tuples:
source code
 
prec_IAU1976(fromEquinox, toEquinox)
returns the precession angles in the IAU 1976 system.
source code
 
prec_Newcomb(fromEquinox, toEquinox)
returns the precession angles for the newcomp
source code
 
getPrecMatrix(fromEquinox, toEquinox, precTheory)
returns a precession matrix in the IAU(1976) system.
source code
 
threeToSix(matrix)
returns a 6-matrix from a 3-matrix suitable for precessing our 6-vectors.
source code
 
fk4ToFK5(sixTrans, svfk4)
returns an FK5 2000 6-vector for an FK4 1950 6-vector.
source code
 
fk5ToFK4(sixTrans, svfk5)
returns an FK4 1950 6-vector for an FK5 2000 6-vector.
source code
 
cross(vec1, vec2)
returns the cross product of two 3-vectors.
source code
 
fk5ToICRS(sixTrans, svFk5)
returns a 6-vector in ICRS for a 6-vector in FK5 J2000.
source code
 
icrsToFK5(sixTrans, svICRS)
returns a 6-vector in FK5 J2000 for an ICRS 6-vector.
source code
 
nullTransform(sv, sixTrans) source code
 
getTrafoFunction(*args)
returns a function that transforms 6-vectors from the system described by srcTriple to the one described by dstTriple.
source code
Variables
  SAME = SAME
  ANYVAL = ANYVAL
  __package__ = 'gavo.stc'
Function Details

prec_IAU1976(fromEquinox, toEquinox)

source code 

returns the precession angles in the IAU 1976 system.

The expressions are those of Lieske, A&A 73, 282.

This function is for the precTheory argument of getPrecMatrix.

prec_Newcomb(fromEquinox, toEquinox)

source code 

returns the precession angles for the newcomp

This function is for the precTheory argument of getPrecMatrix.

The expressions are Kinoshita's (1975)'s (SAOSR 364) This is somewhat at odds with Yallop's choice of Andoyer in the FK4-FK5 machinery below, but that really shouldn't matter.

getPrecMatrix(fromEquinox, toEquinox, precTheory)

source code 

returns a precession matrix in the IAU(1976) system.

fromEquinox and toEquinox are datetimes (in case of doubt, TT).

precTheory(fromEquinox, toEquinox) -> zeta, z, theta computes the precession angles. Defined in this module are prec_IAU1976 and prec_Newcomb, but you can provide your own. The angles must all be in rad.

fk4ToFK5(sixTrans, svfk4)

source code 

returns an FK5 2000 6-vector for an FK4 1950 6-vector.

The procedure used is described in Yallop et al, AJ 97, 274. E-terms of aberration are always removed from proper motions, regardless of whether the objects are within 10 deg of the pole.

fk5ToFK4(sixTrans, svfk5)

source code 

returns an FK4 1950 6-vector for an FK5 2000 6-vector.

This is basically a reversal of fk4ToFK5, except we're always operating in slaComp mode here.

cross(vec1, vec2)

source code 

returns the cross product of two 3-vectors.

This should really be somewhere else...

getTrafoFunction(*args)

source code 

returns a function that transforms 6-vectors from the system described by srcTriple to the one described by dstTriple.

The triples consist of (system, equinox, refpoint).

If no transformation function can be produced, the function raises an STCValueError.

sixTrans is a sphermath.SVConverter instance, used here for communication of input details and user preferences.

Decorators:
  • @memoized