Astronomical functions

pysofa.bi00()

Frame bias components of IAU 2000 precession-nutation models.

Returns:

a tuple of three items:

  • longitude correction (float)
  • obliquity correction (float)
  • the ICRS RA of the J2000.0 mean equinox (float).

See also

SOFA manual.pdf page 24

pysofa.bp00(date1, date2)

Frame bias and precession, IAU 2000.

Parameter:

date1, date2 – TT as a two-part Julian date.

Returns:

a tuple of three items:

  • frame bias matrix (numpy.matrix of shape 3x3)
  • precession matrix (numpy.matrix of shape 3x3)
  • bias-precession matrix (numpy.matrix of shape 3x3)

See also

SOFA manual.pdf page 25

pysofa.bp06(date1, date2)

Frame bias and precession, IAU 2006.

Parameter:

date1, date2 – TT as a two-part Julian date.

Returns:

a tuple of three items:

  • frame bias matrix (numpy.matrix of shape 3x3)
  • precession matrix (numpy.matrix of shape 3x3)
  • bias-precession matrix (numpy.matrix of shape 3x3)

See also

SOFA manual.pdf page 27

pysofa.bpn2xy(rbpn)

Extract from the bias-precession-nutation matrix the X,Y coordinates of the Celestial Intermediate Pole.

Parameter:rbpn (numpy.ndarray, matrix or nested sequences of shape 3x3) – celestial-to-true matrix
Returns:a tuple of two items containing x and y, as floats.

See also

SOFA manual.pdf page 28

pysofa.c2i00a(date1, date2)

Form the celestial-to-intermediate matrix for a given date using the IAU 2000A precession-nutation model.

Parameter:date1, date2 – TT as a two-part Julian date.
Returns:the celestial-to-intermediate matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 29

pysofa.c2i00b(date1, date2)

Form the celestial-to-intermediate matrix for a given date using the IAU 2000B precession-nutation model.

Parameter:date1, date2 – TT as a two-part Julian date.
Returns:the celestial-to-intermediate matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 31

pysofa.c2i06a(date1, date2)

Form the celestial-to-intermediate matrix for a given date using the IAU 2006 precession-nutation model.

Parameter:date1, date2 – TT as a two-part Julian date.
Returns:the celestial-to-intermediate matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 33

pysofa.c2ibpn(date1, date2, rbpn)

Form the celestial-to-intermediate matrix for a given date given the bias-precession-nutation matrix. IAU 2000.

Parameters:
  • date1, date2 – TT as a two-part Julian date.
  • rbpn (numpy.ndarray, numpy.matrix or nested sequences of shape 3x3) – celestial-to-true matrix.
Returns:

the celestial-to-intermediate matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 34

pysofa.c2ixy(date1, date2, x, y)

Form the celestial to intermediate-frame-of-date matrix for a given date when CIP X,Y coordinates are known. IAU 2000.

Parameters:
  • date1, date2 – TT as a two-part Julian date.
  • x, y (float) – celestial intermediate pole coordinates.
Returns:

the celestial-to-intermediate matrix as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 36

pysofa.c2ixys(x, y, s)

Form the celestial to intermediate-frame-of-date matrix given the CIP X,Y coordinates and the CIO locator s.

Parameters:
  • x, y (float) – celestial intermediate pole coordinates.
  • s (float) – the CIO locator.
Returns:

the celestial-to-intermediate matrix as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 38

pysofa.c2t00a(tta, ttb, uta, utb, xp, yp)

Form the celestial-to-terrestrial matrix given the date, the UT1 and the polar motion, using IAU 2000A nutation model.

Parameters:
  • tta, ttb (float) – TT as a two-part Julian date.
  • uta, utb (float) – UT1 as a two-part Julian date.
  • xp, yp (float) – coordinates of the pole in radians.
Returns:

the celestial-to-terrestrial matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 40

pysofa.c2t00b(tta, ttb, uta, utb, xp, yp)

Form the celestial-to-terrestrial matrix given the date, the UT1 and the polar motion, using IAU 2000B nutation model.

Parameters:
  • tta, ttb (float) – TT as a two-part Julian date.
  • uta, utb (float) – UT1 as a two-part Julian date.
  • xp, yp (float) – coordinates of the pole in radians.
Returns:

the celestial-to-terrestrial matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 42

pysofa.c2t06a(tta, ttb, uta, utb, xp, yp)

Form the celestial-to-terrestrial matrix given the date, the UT1 and the polar motion, using the IAU 2006 precession and IAU 2000A nutation models.

Parameters:
  • tta, ttb (float) – TT as a two-part Julian date.
  • uta, utb (float) – UT1 as a two-part Julian date.
  • xp, yp (float) – coordinates of the pole in radians.
Returns:

the celestial-to-terrestrial matrix, as a nunmp.matrix of shape 3x3.

See also

SOFA manual.pdf page 44

pysofa.c2tcio(rc2i, era, rpom)

Assemble the celestial-to-terrestrial matrix from CIO-based components (the celestial-to-intermediate matrix, the Earth Rotation Angle and the polar motion matrix).

Parameters:
  • rc2i (array-like object of shape (3,3)) – celestial-to-intermediate matrix.
  • era (float) – Earth rotation angle
  • rpom (array-like of shape (3,3)) – polar-motion matrix.
Returns:

celestial-to-terrestrial matrix as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 46

pysofa.c2teqx(rbpn, gst, rpom)

Assemble the celestial-to-terrestrial matrix from equinox-based components (the celestial-to-true matrix, the Greenwich Apparent Sidereal Time and the polar motion matrix).

Parameters:
  • rbpn (array-like of shape (3,3)) – celestial-to-true matrix.
  • gst (float) – Greenwich apparent sidereal time.
  • rpom (array-like of shape (3,3)) – polar-motion matrix.
Returns:

celestial-to-terrestrial matrix as a numpy.matrix of shape 3x3.

sofa manual.pdp page 47

pysofa.c2tpe(tta, ttb, uta, utb, dpsi, deps, xp, yp)

Form the celestial-to-terrestrial matrix given the date, the UT1, the nutation and the polar motion. IAU 2000.

Parameters:
  • tta, ttb (float) – TT as a two-part Julian date.
  • uta, utb (float) – UT1 as a two-part Julian date.
  • dpsi, deps (float) – nutation
  • xp, yp (float) – coordinates of the pole in radians.
Returns:

the celestial-to-terrestrial matrix as a nump.matrix of shape 3x3.

See also

SOFA manual.pdf page 48

pysofa.c2txy(tta, ttb, uta, utb, x, y, xp, yp)

Form the celestial-to-terrestrial matrix given the date, the UT1, the CIP coordinates and the polar motion. IAU 2000.

Parameters:
  • tta, ttb (float) – TT as a two-part Julian date.
  • uta, utb (float) – UT1 as a two-part Julian date.
  • x, y (float) – Celestial Intermediate Pole.
  • xp, yp (float) – coordinates of the pole in radians.
Returns:

celestial-to-terrestrial matrix as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 50

pysofa.ee00(date1, date2, epsa, dpsi)

The equation of the equinoxes, compatible with IAU 2000 resolutions, given the nutation in longitude and the mean obliquity.

Parameters:
  • date1, date2 (float) – TT as a two-part Julian date.
  • epsa (float) – mean obliquity.
  • dpsi (float) – nutation in longitude.
Returns:

equation of the equinoxes (float).

See also

SOFA manual.pdf page 66

pysofa.ee00a(date1, date2)

Equation of the equinoxes, compatible with IAU 2000 resolutions.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:equation of the equinoxes (float)

See also

SOFA manual.pdf page 67

pysofa.ee00b(date1, date2)

Equation of the equinoxes, compatible with IAU 2000 resolutions, using truncated nutation model IAU 2000B.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:equation of the equinoxes (float)

See also

SOFA manual.pdf page 68

pysofa.ee06a(date1, date2)

Equation of the equinoxes, compatible with IAU 2000 resolutions and IAU 2006/2000A precession-nutation.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:equation of the equinoxes (float)

See also

SOFA manual.pdf page 69

pysofa.eect00(date1, date2)

Equation of the equinoxes complementary terms, consistent with IAU 2000 resolutions.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:complementary terms (float).

See also

SOFA manual.pdf page 70

pysofa.eform(n)

Earth’s reference ellipsoids.

Parameter:

n (int) –

ellipsoid identifier, should be one of:

  1. WGS84
  2. GRS80
  3. WGS72

Returns:

a tuple of two items:

  • equatorial radius in meters (float)
  • flattening (float)

See also

SOFA manual.pdf page 72

pysofa.eo06a(date1, date2)

Equation of the origins, IAU 2006 precession and IAU 2000A nutation.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:equation of the origins in radians (float).

See also

SOFA manual.pdf page 73

pysofa.eors(rnpb, s)

Equation of the origins, given the classical NPB matrix and the quantity s.

Parameters:
  • rnpb (array-like of shape (3,3)) – classical nutation x precession x bias matrix.
  • s (float) – the CIO locator.
Returns:

the equation of the origins in radians (float).

See also

SOFA manual.pdf page 74

pysofa.epv00(date1, date2)

Earth position and velocity, heliocentric and barycentric, with respect to the Barycentric Celestial Reference System.

Parameter:

date1, date2 (float) – TDB as a two-part Julian date.

Returns:

a tuple of two items:

  • heliocentric Earth position velocity as a numpy.matrix of shape 2x3.
  • barycentric Earth position/velocity as a numpy.matrix of shape 2x3.
Raises:

UserWarning if the date falls outside the range 1900-2100.

See also

SOFA manual.pdf page 79

pysofa.eqeq94(date1, date2)

Equation of the equinoxes, IAU 1994 model.

Parameter:date1, date2 (float) – TDB as a two-part Julian date.
Returns:equation of the equinoxes (float).

See also

SOFA manual.pdf page 81

pysofa.era00(dj1, dj2)

Earth rotation angle IAU 2000 model.

Parameter:dj1, dj2 (float) – UT1 as a two-part Julian date.
Returns:Earth rotation angle in radians, in the range 0-2pi (float).

See also

SOFA manual.pdf page 82

pysofa.fad03(t)

Mean elongation of the Moon from the Sun (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean elongation of the Moon from the Sun in radians (float).

See also

SOFA manual.pdf page 83

pysofa.fae03(t)

Mean longitude of Earth (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Earth in radians (float).

See also

SOFA manual.pdf page 84

pysofa.faf03(t)

Mean longitude of the Moon minus mean longitude of the ascending node (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:result in radians (float).

See also

SOFA manual.pdf page 85

pysofa.faju03(t)

Mean longitude of Jupiter (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Jupiter in radians (float).

See also

SOFA manual.pdf page 86

pysofa.fal03(t)

Mean anomaly of the Moon (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean anomaly of the Moon in radians (float).

See also

SOFA manual.pdf page 87

pysofa.falp03(t)

Mean anomaly of the Sun (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean anomaly of the Sun in radians (float).

See also

SOFA manual.pdf page 88

pysofa.fama03(t)

Mean longitude of Mars (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Mars in radians (float).

See also

SOFA manual.pdf page 89

pysofa.fame03(t)

Mean longitude of Mercury (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Mercury in radians (float).

See also

SOFA manual.pdf page 90

pysofa.fane03(t)

Mean longitude of Neptune (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Neptune in radians (float).

See also

SOFA manual.pdf page 91

pysofa.faom03(t)

Mean longitude of the Moon’s ascending node (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of of the Moon’s ascending node in radians (float).

See also

SOFA manual.pdf page 92

pysofa.fapa03(t)

General accumulated precession in longitude (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:general accumulated precession in longitude in radians (float).

See also

SOFA manual.pdf page 93

pysofa.fasa03(t)

Mean longitude of Saturn (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Saturn in radians (float).

See also

SOFA manual.pdf page 94

pysofa.faur03(t)

Mean longitude of Uranus (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Uranus in radians (float).

See also

SOFA manual.pdf page 95

pysofa.fave03(t)

Mean longitude of Venus (fundamental argument, IERS conventions 2003).

Parameter:t (float) – TDB in Julian centuries since J2000.0
Returns:mean longitude of Venus in radians (float).

See also

SOFA manual.pdf page 96

pysofa.fk52h(r5, d5, dr5, dd5, px5, rv5)

Transform FK5 (J2000.0) star data into the Hipparcos system.

Parameters:
  • r5 (float) – right ascension in radians.
  • d5 (float) – declination in radians.
  • dr5 (float) – proper motion in RA (dRA/dt, rad/Jyear).
  • dd5 (float) – proper motion in Dec (dDec/dt, rad/Jyear).
  • px5 (float) – parallax (arcseconds)
  • rv5 (float) – radial velocity (km/s, positive = receding)
Returns:

a tuple of six items corresponding to Hipparcos epoch J2000.0:

  • right ascension
  • declination
  • proper motion in RA (dRa/dt, rad/Jyear)
  • proper motion in Dec (dDec/dt, rad/Jyear)
  • parallax in arcseconds
  • radial velocity (km/s, positive = receding).

See also

SOFA manual.pdf page 97

pysofa.fk5hip()

FK5 to Hipparcos rotation and spin.

Returns:

a tuple of two items:

  • FK5 rotation wrt Hipparcos as a numpy.matrix of shape 3x3
  • FK5 spin wrt Hipparcos as a numpy.matrix of shape 1x3

See also

SOFA manual.pdf page 98

pysofa.fk5hz(r5, d5, date1, date2)

Transform an FK5 (J2000.0) star position into the system of the Hipparcos catalogue, assuming zero Hipparcos proper motion.

Parameters:
  • r5 (float) – right ascension in radians, equinox J2000.0, at date.
  • d5 (float) – declination in radians, equinox J2000.0, at date.
  • date1, date2 (float) – TDB date as a two-part Julian date.
Returns:

a tuple of two items:

  • Hipparcos right ascension in radians (float)
  • Hipparcos declination in radians (float).

See also

SOFA manual.pdf page 99

pysofa.fw2m(gamb, phib, psi, eps)

Form rotation matrix given the Fukushima-Williams angles.

Parameters:
  • gamb (float) – F-W angle gamma_bar in radians.
  • phib (float) – F-W angle phi_bar in radians.
  • psi (float) – F-W angle psi in radians.
  • eps – F-W angle epsilon in radians.
Returns:

rotation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 101

pysofa.fw2xy(gamb, phib, psi, eps)

CIP X and Y given Fukushima-Williams bias-precession-nutation angles.

Parameters:
  • gamb (float) – F-W angle gamma_bar in radians.
  • phib (float) – F-W angle phi_bar in radians.
  • psi (float) – F-W angle psi in radians.
  • eps – F-W angle epsilon in radians.
Returns:

a tuple containing CIP X and X in radians (float).

See also

SOFA manual.pdf page 103

pysofa.gc2gd(n, xyz)

Transform geocentric coordinates to geodetic using the specified reference ellipsoid.

Parameters:
  • n (int) –

    ellipsoid identifier, should be one of:

    1. WGS84
    2. GRS80
  • xyz (array-like of shape (1,3)) – geocentric vector.
Returns:

a tuple of three items:

  • longitude in radians (float)
  • geodetic latitude in radians (float)
  • geodetic height above ellipsoid (float).
Raises:

ValueError for invalid ellipsoid identifier.

See also

SOFA manual.pdf page 104

pysofa.gc2gde(a, f, xyz)

Transform geocentric coordinates to geodetic for a reference ellipsoid of specified form.

Parameters:
  • a (float) – equatorial radius.
  • f (float) – flattening.
  • xyz (array-like of shape (1,3)) – geocentric vector.
Returns:

a tuple of three items:

  • longitude in radians
  • geodetic latitude in radians
  • geodetic height above ellipsoid
Raises:

ValueError if supplied values for a or f are nor valid.

See also

SOFA manual.pdf page 105

pysofa.gd2gc(n, elong, phi, height)

Transform geodetic coordinates to geocentric using specified reference ellipsoid.

Parameters:
  • n (int) –

    ellipsoid identifier, should be one of:

    1. WGS84
    2. GRS80
    3. WGS72
  • elong (float) – longitude in radians.
  • phi (float) – geodetic latitude in radians.
  • height (float) – geodetic height above ellipsoid in meters.
Returns:

geocentric vector as a numpy.matrix of shape 1x3.

Raises:

ValueError in case of invalid ellipsoid identifier or invalid coordinate values.

See also

SOFA manual.pdf page 106

pysofa.gd2gce(a, f, elong, phi, height)

Transform geodetic coordinates to geocentric for a reference ellipsoid of specified form.

Parameters:
  • a (float) – equatorial radius.
  • f (float) – flattening.
  • elong (float) – longitude in radians.
  • phi (float) – geodetic latitude in radians.
  • height (float) – geodetic height above ellipsoid in meters.
Returns:

geocentric vector as a numpy.matrix of shape 1x3.

See also

SOFA manual.pdf page 107

pysofa.gmst00(uta, utb, tta, ttb)

Greenwich mean sidereal time, consistent with IAU 2000 resolutions.

Parameters:
  • uta, utb (float) – UT1 as a two-part Julian date.
  • tta, ttb (float) – TT as a two-part Julian date.
Returns:

Greenwich mean sidereal time in radians (float).

See also

SOFA manual.pdf page 108

pysofa.gmst06(uta, utb, tta, ttb)

Greenwich mean sidereal time, consistent with IAU 2006 precession.

Parameters:
  • uta, utb (float) – UT1 as a two-part Julian date.
  • tta, ttb (float) – TT as a two-part Julian date.
Returns:

Greenwich mean sidereal time in radians (float).

See also

SOFA manual.pdf page 110

pysofa.gmst82(dj1, dj2)

Greenwich mean sidereal time, IAU 1982 model.

Parameter:dj1, dj2 – UT1 as a two-part Julian date.
Returns:Greenwich mean sidereal time in radians (float).

See also

SOFA manual.pdf page 111

pysofa.gst00a(uta, utb, tta, ttb)

Greenwich apparent sidereal time, consistent with IAU 2000 resolutions.

Parameters:
  • uta, utb (float) – UT1 as a two-part Julian date.
  • tta, ttb (float) – TT as a two-part Julian date.
Returns:

Greenwich apparent sidereal time in radians (float).

See also

SOFA manual.pdf page 112

pysofa.gst00b(uta, utb)

Greenwich apparent sidereal time, consistent with IAU 2000 resolutions, using truncated nutation model IAU 2000B.

Parameter:uta, utb (float) – UT1 as a two-part Julian date.
Returns:Greenwich apparent sidereal time in radians (float).

See also

SOFA manual.pdf page 114

pysofa.gst06(uta, utb, tta, ttb, rnpb)

Greenwich apparent sidereal time, IAU 2006, given the npb matrix.

Parameters:
  • uta, utb (float) – UT1 as a two-part Julian date.
  • tta, ttb (float) – TT as a two-part Julian date.
  • rnpb (array-like of shape (3,3)) – nutation x precession x bias matrix.
Returns:

Greenwich apparent sidereal time in radians (float).

See also

SOFA manual.pdf page 116

pysofa.gst06a(uta, utb, tta, ttb)

Greenwich apparent sidereal time, consistent with IAU 2000 and 2006 resolutions.

Parameters:
  • uta, utb (float) – UT1 as a two-part Julian date.
  • tta, ttb (float) – TT as a two-part Julian date.
Returns:

Greenwich apparent sidereal time in radians (float).

See also

SOFA manual.pdf page 117

pysofa.gst94(uta, utb)

Greenwich apparent sidereal time, consistent with IAU 1982/94 resolutions.

Parameter:uta, utb (float) – UT1 as a two-part Julian date.
Returns:Greenwich apparent sidereal time in radians (float).

See also

SOFA manual.pdf page 118

pysofa.h2fk5(rh, dh, drh, ddh, pxh, rvh)

Transform Hipparcos star data into FK5 (J2000.0) system.

Parameters:
  • rh (float) – right ascension in radians.
  • dh (float) – declination in radians.
  • drh (float) – proper motion in RA (dRA/dt, rad/Jyear).
  • ddh (float) – proper motion in Dec (dDec/dt, rad/Jyear).
  • pxh (float) – parallax in arcseconds.
  • rvh (float) – radial velocity (km/s, positive = receding).
Returns:

a tuple of six items:

  • right ascension in radians
  • declination in radians
  • proper motion in RA (dRA/dt, rad/Jyear)
  • proper motion in Dec (dDec/dt, rad/Jyear)
  • parallax in arcseconds
  • radial velocity (km/s, positive = receding).

See also

SOFA manual.pdf page 119

pysofa.hfk5z(rh, dh, date1, date2)

Transform Hipparcos star position into FK5 (J2000.0), assuming zero Hipparcos proper motion.

Parameters:
  • rh (float) – right ascension in radians.
  • dh (float) – declination in radians.
  • date1, date2 (float) – TDB as a two-part Julian date.
Returns:

a tuple of four items:

  • right ascension in radians
  • declination in radians
  • proper motion in RA (rad/year)
  • proper motion in Dec (rad/year)

See also

SOFA manual.pdf page 120

pysofa.num00a(date1, date2)

Form the matrix of nutation for a given date, IAU 2000A model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:nutation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 125

pysofa.num00b(date1, date2)

Form the matrix of nutation for a given date, IAU 2000B model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:nutation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 126

pysofa.num06a(date1, date2)

Form the matrix of nutation for a given date, IAU 2006/2000A model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:nutation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 127

pysofa.numat(epsa, dpsi, deps)

Form the matrix of nutation.

Parameters:
  • epsa (float) – mean obliquity of date.
  • dpsi, deps (float) – nutation.
Returns:

nutation matrix as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 128

pysofa.nut00a(date1, date2)

Nutation, IAU 2000A model (MHB2000 luni-solar and planetary nutation with free core nutation omitted).

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 2-tuple:

  • nutation in longitude in radians (float)
  • nutation in obliquity in radians (float).

See also

SOFA manual.pdf page 129

pysofa.nut00b(date1, date2)

Nutation, IAU 2000B model.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 2-tuple:

  • nutation in longitude in radians (float)
  • nutation in obliquity in radians (float).

See also

SOFA manual.pdf page 132

pysofa.nut06a(date1, date2)

IAU 2000A nutation with adjustments to match the IAU 2006 precession.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 2-tuple:

  • nutation in longitude in radians (float)
  • nutation in obliquity in radians (float).

See also

SOFA manual.pdf page 134

pysofa.nut80(date1, date2)

Nutation, IAU 1980 model.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 2-tuple:

  • nutation in longitude in radians (float)
  • nutation in obliquity in radians (float).

See also

SOFA manual.pdf page 136

pysofa.nutm80(date1, date2)

Form the nutation matrix for a given date, IAU 1980 model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:the nutation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 137

pysofa.obl06(date1, date2)

Mean obliquity of the ecliptic, IAU 2006 precession model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:obliquity of the ecliptic in radians (float).

See also

SOFA manual.pdf page 138

pysofa.obl80(date1, date2)

Mean obliquity of the ecliptic, IAU 1980 model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:obliquity of the ecliptic in radians (float).

See also

SOFA manual.pdf page 139

pysofa.p06e(date1, date2)

Precession angles, IAU 2006, equinox based.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 16-tuple:

  • epsilon_0
  • psi_A
  • omega_A
  • P_A
  • Q_A
  • pi_A
  • Pi_A
  • obliquity epsilon_A
  • chi_A
  • z_A
  • zeta_A
  • theta_A
  • p_A
  • F-W angle gamma_J2000
  • F-W angle phi_J2000
  • F-W angle psi_J2000

See also

SOFA manual.pdf page 140

pysofa.pb06(date1, date2)

Form the three Euler angles which implement general precession from epoch J2000.0, using IAU 2006 model. Frame bias is included.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 3-tuple:

  • 1st rotation: radians cw around z (float)
  • 3rd rotation: radians cw around z (float)
  • 2nd rotation: radians ccw around y.

See also

SOFA manual.pdf page 146

pysofa.pfw06(date1, date2)

Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 4-tuple:

  • F-W angle gamma_bar in radians (float)
  • F-W angle phi_bar in radians (float)
  • F-W angle psi_bar in radians (float)
  • F-W angle epsilon_A in radians (float).

See also

SOFA manual.pdf page 148

pysofa.plan94(date1, date2, np)

Approximate heliocentric position and velocity of a nominated major planet : Mercury, Venus, EMB, Mars, Jupiter, Saturn, Uranus or Neptune.

Parameters:
  • date1, date2 (float) – TDB as a two-part Julian date.
  • np (int) – planet identifier (1=Mercury, 2=Venus, 3=EMB, 4=Mars, 5=Jupiter, 6=Saturn, 7=Uranus, 8=Neptune).
Returns:

planet’s position and velocity (heliocentric, J2000.0, AU, AU/d) as a numpy.matrix of shape 2x3

Raises:

ValueError if the planet identifier is invalid (outside 1..8).

UserWarning if the year is outside the range 1000-3000.

See also

SOFA manual.pdf page 150

pysofa.pmat00(date1, date2)

Precession matrix (including frame bias) from GCRS to a specified date, IAU 2000 model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:bias-precession matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 154

pysofa.pmat06(date1, date2)

Precession matrix (including frame bias) from GCRS to a specified date, IAU 2006 model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:bias-precession matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 155

pysofa.pmat76(date1, date2)

Precession matrix from J2000.0 to a specified date, IAU 1976 model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:bias-precession matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 156

pysofa.pn00(date1, date2, dpsi, deps)

Precession-nutation, IAU 2000 model.

Parameters:
  • date1, date2 (float) – TT as a two-part Julian date.
  • dpsi, deps (float) – nutation.
Returns:

a 6-tuple:

  • mean obliquity (float)
  • frame bias matrix (numpy.matrix of shape 3x3)
  • precession matrix (numpy.matrix of shape 3x3)
  • bias-precession matrix (numpy.matrix of shape 3x3)
  • nutation matrix (numpy.matrix of shape 3x3)
  • GCRS-to-true matrix (numpy.matrix of shape 3x3).

See also

SOFA manual.pdf page 160

pysofa.pn00a(date1, date2)

Precession-nutation, IAU 2000A model.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 8-tuple:

  • nutation in longitude (float)
  • nutation in obliquity (float)
  • mean obliquity (float)
  • frame bias matrix (numpy.matrix of shape 3x3)
  • precession matrix (numpy.matrix of shape 3x3)
  • bias-precession matrix (numpy.matrix of shape 3x3)
  • nutation matrix (numpy.matrix of shape 3x3)
  • GCRS-to-true matrix (numpy.matrix of shape 3x3).

See also

SOFA manual.pdf page 162

pysofa.pn00b(date1, date2)

Precession-nutation, IAU 2000B model.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 8-tuple:

  • nutation in longitude (float)
  • nutation in obliquity (float)
  • mean obliquity (float)
  • frame bias matrix (numpy.matrix of shape 3x3)
  • precession matrix (numpy.matrix of shape 3x3)
  • bias-precession matrix (numpy.matrix of shape 3x3)
  • nutation matrix (numpy.matrix of shape 3x3)
  • GCRS-to-true matrix (numpy.matrix of shape 3x3).

See also

SOFA manual.pdf page 164

pysofa.pn06(date1, date2, dpsi, deps)

Precession-nutation, IAU 2006 model.

Parameters:
  • date1, date2 (float) – TT as a two-part Julian date.
  • dpsi, deps (float) – nutation.
Returns:

a 6-tuple:

  • mean obliquity (float)
  • frame bias matrix (numpy.matrix of shape 3x3)
  • precession matrix (numpy.matrix of shape 3x3)
  • bias-precession matrix (numpy.matrix of shape 3x3)
  • nutation matrix (numpy.matrix of shape 3x3)
  • GCRS-to-true matrix (numpy.matrix of shape 3x3).

See also

SOFA manual.pdf page 166

pysofa.pn06a(date1, date2)

Precession-nutation, IAU 2006/2000A models.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 8-tuple:

  • nutation in longitude (float)
  • nutation in obliquity (float)
  • mean obliquity (float)
  • frame bias matrix (numpy.matrix of shape 3x3)
  • precession matrix (numpy.matrix of shape 3x3)
  • bias-precession matrix (numpy.matrix of shape 3x3)
  • nutation matrix (numpy.matrix of shape 3x3)
  • GCRS-to-true matrix (numpy.matrix of shape 3x3).

See also

SOFA manual.pdf page 168

pysofa.pnm00a(date1, date2)

Form the matrix of precession-nutation for a given date (including frame bias), equinox-based, IAU 2000A model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:classical NPB matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 170

pysofa.pnm00b(date1, date2)

Form the matrix of precession-nutation for a given date (including frame bias), equinox-based, IAU 2000B model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:bias-precession-nutation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 171

pysofa.pnm06a(date1, date2)

Form the matrix of precession-nutation for a given date (including frame bias), IAU 2006 precession and IAU 2000A nutation models.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:bias-precession-nutation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 172

pysofa.pnm80(date1, date2)

Form the matrix of precession/nutation for a given date, IAU 1976 precession model, IAU 1980 nutation model).

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:combined precessoin/nutation matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 173

pysofa.pom00(xp, yp, sp)

Form the matrix of polar motion for a given date, IAU 2000.

Parameters:
  • xp, yp (float) – coordinates of the pole in radians.
  • sp (float) – the TIO locator in radians.
Returns:

the polar motion matrix, as a numpy.matrix of shape 3x3.

See also

SOFA manual.pdf page 174

pysofa.pr00(date1, date2)

Precession-rate part of the IAU 2000 precession-nutation models.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 2-tuple:

  • precession correction in longitude (float)
  • precession correction in obliquity (float).

See also

SOFA manual.pdf page 177

pysofa.prec76(ep01, ep02, ep11, ep12)

Form the three Euler angles wich implement general precession between two epochs, using IAU 1976 model (as for FK5 catalog).

Parameters:
  • ep01, ep02 (float) – two-part TDB starting epoch.
  • ep11, ep12 (float) – two-part TDB ending epoch.
Returns:

a 3-tuple:

  • 1st rotation: radians cw around z (float)
  • 3rd rotation: radians cw around z (float)
  • 2nd rotation: radians ccw around y (float).

See also

SOFA manual.pdf page 179

pysofa.pvstar(pv)

Convert star position-velocity vector to catalog coordinates.

Parameter:

pv (array-like of shape (2,3)) – pv-vector (AU, AU/day).

Returns:

a 6-tuple:

  • right ascensin in radians (float)
  • declination in radians (float)
  • RA proper motion (radians/year) (float)
  • Dec proper motion (radians/year) (float)
  • parallax in arcseconds (float)
  • radial velocity (km/s, positive = receding)
Raises:

ValueError if the speed is greater than or equal to the speed of light.

See also

SOFA manual.pdf page 187

pysofa.s00(date1, date2, x, y)

The CIO locator s, positioning the celestial intermediate origin on the equator of the celestial intermediate pole, given the CIP’s X,Y coordinates. Compatible with IAU 2000A precession-nutation.

Parameters:
  • date1, date2 (float) – TT as a two-part Julian date.
  • x, y (float) – CIP coordinates.
Returns:

the CIO locator s in radians (float).

See also

SOFA manual.pdf page 201

pysofa.s00a(date1, date2)

The CIO locator, positioning the celestial intermediate origin on the equator of the celestial intermediate pole, using IAU 2000A precession-nutation model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:the CIO locator s in radians (float):

See also

SOFA manual.pdf page 203

pysofa.s00b(date1, date2)

The CIO locator, positioning the celestial intermediate origin on the equator of the celestial intermediate pole, using IAU 2000B precession-nutation model.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:the CIO locator s in radians (float):

See also

SOFA manual.pdf page 205

pysofa.s06(date1, date2, x, y)

The CIO locator s, positioning the celestial intermediate origin on the equator of the celestial intermediate pole, given the CIP’s X,Y coordinates. Compatible with IAU 2006/2000A precession-nutation.

Parameters:
  • date1, date2 (float) – TT as a two-part Julian date.
  • x, y (float) – CIP coordinates.
Returns:

the CIO locator s in radians (float).

See also

SOFA manual.pdf page 207

pysofa.s06a(date1, date2)

The CIO locator, positioning the celestial intermediate origin on the equator of the celestial intermediate pole, using IAU 2006 precession and IAU 2000A nutation models.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:the CIO locator s in radians (float):

See also

SOFA manual.pdf page 209

pysofa.sp00(date1, date2)

The TIO locator, positioning the terrestrial intermediate origin on the equator of the celestial intermediate pole.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:the TIO locator in radians (float).

See also

SOFA manual.pdf page 217

pysofa.starpm(ra1, dec1, pmr1, pmd1, px1, rv1, ep1a, ep1b, ep2a, ep2b)

Update star catalog data for space motion.

Parameters:
  • ra1 (float) – right ascension in radians.
  • dec1 (float) – declination in radians.
  • pmr1 (float) – proper motion in RA (radians/year).
  • pmd1 (float) – proper motion in Dec (radians/year).
  • px1 (float) – parallax in arcseconds.
  • rv1 (float) – radial velocity (km/s, positive = receding).
  • ep1a, ep1b (float) – two-part starting epoch.
  • ep2a, ep2b (float) – two-part ending epoch.
Returns:

a 6-tuple:

  • the new right ascension in radians (float)
  • the new declination in radians (float)
  • the new RA proper motion in radians/year (float)
  • the new Dec proper motion in radians/year (float)
  • the new parallax in arcseconds (float)
  • the new radial velocity (km/s)

See also

SOFA manual.pdf page 218

pysofa.starpv(ra, dec, pmr, pmd, px, rv)

Convert star catalog coordinates to position+velocity vector.

Parameters:
  • ra (float) – right ascension in radians.
  • dec (float) – declination in radians.
  • pmr (float) – proper motion in RA (radians/year).
  • pmd (float) – proper motion in Dec (radians/year).
  • px (float) – parallax in arcseconds.
  • rv (float) – radial velocity (km/s, positive = receding).
Returns:

the pv-vector (AU, AU/day) as a numpy.matrix of shape 2x3

See also

SOFA manual.pdf page 220

pysofa.xy06(date1, date2)

X,Y coordinates of the celestial intermediate pole from series based on IAU 2006 precession and IAU 2000A nutation.

Parameter:date1, date2 (float) – TT as a two-part Julian date.
Returns:a 2-tuple containing X and Y CIP coordinates.

See also

SOFA manual.pdf page 246

pysofa.xys00a(date1, date2)

For a given TT date, compute X, Y coordinates of the celestial intermediate pole and the CIO locator s, using IAU 2000A precession-nutation model.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 3-tuple:

  • X CIP coordinate
  • Y CIP coordinate
  • the CIO locator s.

See also

SOFA manual.pdf page 248

pysofa.xys00b(date1, date2)

For a given TT date, compute X, Y coordinates of the celestial intermediate pole and the CIO locator s, using IAU 2000B precession-nutation model.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 3-tuple:

  • X CIP coordinate
  • Y CIP coordinate
  • the CIO locator s.

See also

SOFA manual.pdf page 249

pysofa.xys06a(date1, date2)

For a given TT date, compute X, Y coordinates of the celestial intermediate pole and the CIO locator s, using IAU 2006 precession and IAU 2000A nutation models.

Parameter:

date1, date2 (float) – TT as a two-part Julian date.

Returns:

a 3-tuple:

  • X CIP coordinate
  • Y CIP coordinate
  • the CIO locator s.

See also

SOFA manual.pdf page 250

Previous topic

Date time functions

Next topic

Vector/Matrix/Angle functions

This Page