astro

  • Astronomical and nutation routines

  • Computes the basic astronomical mean longitudes and other fundamental orbital parameters

  • Computes the solar and lunar positions in Earth-Centered Earth-Fixed (ECEF) coordinates

Calling Sequence

import pyTMD.astro
S,H,P,N,PP = pyTMD.astro.mean_longitudes(MJD, ASTRO5=True)

Source code

pyTMD.astro.polynomial_sum(coefficients: list | numpy.ndarray, t: ndarray)[source]

Calculates the sum of a polynomial function of time

Parameters
coefficients: list or np.ndarray

leading coefficient of polynomials of increasing order

t: np.ndarray

delta time in units for a given astronomical longitudes calculation

pyTMD.astro.rotate(theta: float | numpy.ndarray, axis: str = 'x')[source]

Rotate a 3-dimensional matrix about a given axis

Parameters
theta: float or np.ndarray

Angle of rotation in radians

axis: str

Axis of rotation ('x', 'y', or 'z')

pyTMD.astro.mean_longitudes(MJD: ndarray, MEEUS: bool = False, ASTRO5: bool = False)[source]

Computes the basic astronomical mean longitudes: S, H, P, N and PP [1] [2]

Note N is not N’, i.e. N is decreasing with time.

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

MEEUS: bool, default False

use additional coefficients from Meeus Astronomical Algorithms

ASTRO5: bool, default False

use Meeus Astronomical coefficients as implemented in ASTRO5

Returns
S: np.ndarray

mean longitude of moon (degrees)

H: np.ndarray

mean longitude of sun (degrees)

P: np.ndarray

mean longitude of lunar perigee (degrees)

N: np.ndarray

mean longitude of ascending lunar node (degrees)

PP: np.ndarray

longitude of solar perigee (degrees)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

J. L. Simon, P. Bretagnon, J. Chapront, M. Chapront-Touzé, G. Francou, and J. Laskar “Numerical expressions for precession formulae and mean elements for the Moon and the planets”, Astronomy and Astrophysics, 282(2), 663–683, (1994). bibcode: 1994A%26A…282..663S

pyTMD.astro.doodson_arguments(MJD: ndarray, equinox: bool = False, apply_correction: bool = True)[source]

Computes astronomical phase angles for the six Doodson Arguments: tau, S, H, P, and N’, and Ps [1] [2]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

equinox: bool, default False

use equinox method for calculating mean lunar time

apply_correction: bool, default True

Apply correction for mean lunar longitude

Returns
TAU: np.ndarray

mean lunar time (radians)

S: np.ndarray

mean longitude of the moon (radians)

H: np.ndarray

mean longitude of the sun (radians)

P: np.ndarray

mean longitude of lunar perigee (radians)

Np: np.ndarray

negative mean longitude of the ascending node (radians)

Ps: np.ndarray

mean longitude of solar perigee (radians)

References

1

A. T. Doodson and H. Lamb, “The harmonic development of the tide-generating potential”, Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, 100(704), 305–329, (1921). doi: 10.1098/rspa.1921.0088

2
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

pyTMD.astro.delaunay_arguments(MJD: ndarray)[source]

Computes astronomical phase angles for the five primary Delaunay Arguments of Nutation: l, l’, F, D, and N [1] [2] [3]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

Returns
l: np.ndarray

mean anomaly of moon (radians)

lp: np.ndarray

mean anomaly of the sun (radians)

F: np.ndarray

mean argument of the moon (radians)

D: np.ndarray

mean elongation of the moon from the sun (radians)

N: np.ndarray

mean longitude of ascending lunar node (radians)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

G. Petit and B. Luzum (eds.), IERS Conventions (2010), International Earth Rotation and Reference Systems Service (IERS), IERS Technical Note No. 36

3

N. Capitaine, P. T. Wallace, and J. Chapront, “Expressions for IAU 2000 precession quantities”, Astronomy & Astrophysics, 412, 567–586, (2003). doi: 10.1051/0004-6361:20031539

pyTMD.astro.mean_obliquity(MJD: ndarray)[source]

Mean obliquity of the ecliptic

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

References

1

N. Capitaine, P. T. Wallace, and J. Chapront, “Expressions for IAU 2000 precession quantities”, Astronomy & Astrophysics, 412, 567–586, (2003). doi: 10.1051/0004-6361:20031539

1

N. Capitaine, J. Chapront, S. Lambert, and P. T. Wallace, “Expressions for the Celestial Intermediate Pole and Celestial Ephemeris Origin consistent with the IAU 2000A precession-nutation model”, Astronomy & Astrophysics, 400, 1145–1154, (2003). doi: 10.1051/0004-6361:20030077

pyTMD.astro.solar_ecef(MJD: ndarray, **kwargs)[source]

Wrapper function for calculating the positional coordinates of the sun in an Earth-centric, Earth-Fixed (ECEF) frame [1] [2] [3]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

ephemerides: str, default ‘approximate’

Method for calculating solar ephemerides

  • 'approximate': low-resolution ephemerides

  • 'JPL': computed ephemerides from JPL kernels

kwargs: dict

Keyword options for ephemeris calculation

Returns
X, Y, Z: np.ndarray

ECEF coordinates of the sun (meters)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

O. Montenbruck, Practical Ephemeris Calculations, 146 pp., (1989).

3

R. S. Park, W. M. Folkner, and J. G. Williams, and D. H. Boggs, “The JPL Planetary and Lunar Ephemerides DE440 and DE441”, The Astronomical Journal, 161(3), 105, (2021). doi: 10.3847/1538-3881/abd414

pyTMD.astro.solar_approximate(MJD, **kwargs)[source]

Computes approximate positional coordinates of the sun in an Earth-centric, Earth-Fixed (ECEF) frame [1] [2]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

Returns
X, Y, Z: np.ndarray

ECEF coordinates of the sun (meters)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

O. Montenbruck, Practical Ephemeris Calculations, 146 pp., (1989).

pyTMD.astro.solar_ephemerides(MJD: ndarray, **kwargs)[source]

Computes positional coordinates of the sun in an Earth-centric, Earth-Fixed (ECEF) frame using JPL ephemerides [1] [2]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

kernel: str or pathlib.Path

Path to JPL ephemerides kernel file

Returns
X, Y, Z: np.ndarray

ECEF coordinates of the sun (meters)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

R. S. Park, W. M. Folkner, and J. G. Williams, and D. H. Boggs, “The JPL Planetary and Lunar Ephemerides DE440 and DE441”, The Astronomical Journal, 161(3), 105, (2021). doi: 10.3847/1538-3881/abd414

pyTMD.astro.lunar_ecef(MJD: ndarray, **kwargs)[source]

Wrapper function for calculating the positional coordinates of the moon in an Earth-centric, Earth-Fixed (ECEF) frame [1] [2] [3]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

ephemerides: str, default ‘approximate’

Method for calculating lunar ephemerides

  • 'approximate': low-resolution ephemerides

  • 'JPL': computed ephemerides from JPL kernels

kwargs: dict

Keyword options for ephemeris calculation

Returns
X, Y, Z: np.ndarray

ECEF coordinates of the moon (meters)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

O. Montenbruck, Practical Ephemeris Calculations, 146 pp., (1989).

3

R. S. Park, W. M. Folkner, and J. G. Williams, and D. H. Boggs, “The JPL Planetary and Lunar Ephemerides DE440 and DE441”, The Astronomical Journal, 161(3), 105, (2021). doi: 10.3847/1538-3881/abd414

pyTMD.astro.lunar_approximate(MJD, **kwargs)[source]

Computes approximate positional coordinates of the moon in an Earth-centric, Earth-Fixed (ECEF) frame [1] [2]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

Returns
X, Y, Z: np.ndarray

ECEF coordinates of the moon (meters)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

O. Montenbruck, Practical Ephemeris Calculations, 146 pp., (1989).

pyTMD.astro.lunar_ephemerides(MJD: ndarray, **kwargs)[source]

Computes positional coordinates of the moon in an Earth-centric, Earth-Fixed (ECEF) frame using JPL ephemerides [1] [2]

Parameters
MJD: np.ndarray

Modified Julian Day (MJD) of input date

kernel: str or pathlib.Path

Path to JPL ephemerides kernel file

Returns
X, Y, Z: np.ndarray

ECEF coordinates of the moon (meters)

References

1
  1. Meeus, Astronomical Algorithms, 2nd edition, 477 pp., (1998).

2

R. S. Park, W. M. Folkner, and J. G. Williams, and D. H. Boggs, “The JPL Planetary and Lunar Ephemerides DE440 and DE441”, The Astronomical Journal, 161(3), 105, (2021). doi: 10.3847/1538-3881/abd414

pyTMD.astro.gast(T: float | numpy.ndarray)[source]

Greenwich Apparent Sidereal Time (GAST) [1] [2] [3]

Parameters
T: np.ndarray

Centuries since 2000-01-01T12:00:00

References

1

N. Capitaine, P. T. Wallace, and J. Chapront, “Expressions for IAU 2000 precession quantities”, Astronomy & Astrophysics, 412, 567–586, (2003). doi: 10.1051/0004-6361:20031539

2

N. Capitaine, J. Chapront, S. Lambert, and P. T. Wallace, “Expressions for the Celestial Intermediate Pole and Celestial Ephemeris Origin consistent with the IAU 2000A precession-nutation model”, Astronomy & Astrophysics, 400, 1145–1154, (2003). doi: 10.1051/0004-6361:20030077

3

G. Petit and B. Luzum (eds.), IERS Conventions (2010), International Earth Rotation and Reference Systems Service (IERS), IERS Technical Note No. 36

pyTMD.astro.itrs(T: float | numpy.ndarray)[source]

International Terrestrial Reference System (ITRS) [1] [2] [3]: An Earth-centered Earth-fixed (ECEF) coordinate system combining the Earth’s true equator and equinox of date, the Earth’s rotation with respect to the stars, and the polar wobble of the crust with respect to the pole of rotation.

Parameters
T: np.ndarray

Centuries since 2000-01-01T12:00:00

References

1

N. Capitaine, P. T. Wallace, and J. Chapront, “Expressions for IAU 2000 precession quantities”, Astronomy & Astrophysics, 412, 567–586, (2003). doi: 10.1051/0004-6361:20031539

2

N. Capitaine, J. Chapront, S. Lambert, and P. T. Wallace, “Expressions for the Celestial Intermediate Pole and Celestial Ephemeris Origin consistent with the IAU 2000A precession-nutation model”, Astronomy & Astrophysics, 400, 1145–1154, (2003). doi: 10.1051/0004-6361:20030077

3

G. Petit and B. Luzum (eds.), IERS Conventions (2010), International Earth Rotation and Reference Systems Service (IERS), IERS Technical Note No. 36

pyTMD.astro._eqeq_complement(T: float | numpy.ndarray)[source]

Compute complementary terms of the equation of the equinoxes [1] [2] [3]

Parameters
T: np.ndarray

Centuries since 2000-01-01T12:00:00

References

1

N. Capitaine, P. T. Wallace, and J. Chapront, “Expressions for IAU 2000 precession quantities”, Astronomy & Astrophysics, 412, 567–586, (2003). doi: 10.1051/0004-6361:20031539

2

N. Capitaine, J. Chapront, S. Lambert, and P. T. Wallace, “Expressions for the Celestial Intermediate Pole and Celestial Ephemeris Origin consistent with the IAU 2000A precession-nutation model”, Astronomy & Astrophysics, 400, 1145–1154, (2003). doi: 10.1051/0004-6361:20030077

3

G. Petit and B. Luzum (eds.), IERS Conventions (2010), International Earth Rotation and Reference Systems Service (IERS), IERS Technical Note No. 36

pyTMD.astro._frame_bias_matrix()[source]

Frame bias rotation matrix

pyTMD.astro._nutation_angles(T: float | numpy.ndarray)[source]

Calculate nutation rotation angles using tables from IERS Conventions [1]

Parameters
T: np.ndarray

Centuries since 2000-01-01T12:00:00

Returns
dpsi: np.ndarray

Nutation in longitude

deps: np.ndarray

Obliquity of the ecliptic

References

1

G. Petit and B. Luzum (eds.), IERS Conventions (2010), International Earth Rotation and Reference Systems Service (IERS), IERS Technical Note No. 36

pyTMD.astro._nutation_matrix(mean_obliquity: float | numpy.ndarray, true_obliquity: float | numpy.ndarray, psi: float | numpy.ndarray)[source]

Nutation rotation matrix

Parameters
mean_obliquity: np.ndarray

Mean obliquity of the ecliptic

true_obliquity: np.ndarray

True obliquity of the ecliptic

psi: np.ndarray

Nutation in longitude

pyTMD.astro._polar_motion_matrix(T: float | numpy.ndarray)[source]

Polar motion (Earth Orientation Parameters) rotation matrix

Parameters
T: np.ndarray

Centuries since 2000-01-01T12:00:00

pyTMD.astro._precession_matrix(T: float | numpy.ndarray)[source]

Precession rotation matrix

Parameters
T: np.ndarray

Centuries since 2000-01-01T12:00:00

pyTMD.astro._parse_table_5_2e()[source]

Parse table with expressions for Greenwich Sidereal Time provided in Chapter 5 of IERS Conventions

pyTMD.astro._parse_table_5_3a()[source]

Parse table with IAU 2000A lunisolar and planetary components of nutation in longitude provided in Chapter 5 of IERS Conventions

pyTMD.astro._parse_table_5_3b()[source]

Parse table with IAU 2000A lunisolar and planetary components of nutation in obliquity provided in Chapter 5 of IERS Conventions