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
- pyTMD.astro.mean_longitudes(MJD: ndarray, **kwargs)[source]
Computes the basic astronomical mean longitudes: \(S\), \(H\), \(P\), \(N\) and \(P_s\) [42, 64]
Note \(N\) is not \(N'\), i.e. \(N\) is decreasing with time.
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- method: str, default ‘Cartwright’
Method for calculating mean longitudes
'Cartwright': use coefficients from David Cartwright'Meeus': use coefficients from Meeus Astronomical Algorithms'ASTRO5': use Meeus Astronomical coefficients fromASTRO5'IERS': convert from IERS Delaunay arguments
- 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)
- Ps: np.ndarray
Longitude of solar perigee (degrees)
- pyTMD.astro.planetary_longitudes(MJD: ndarray)[source]
Computes the astronomical mean longitudes of the 5 closest planets [7, 42, 64]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- Returns:
- LMe: np.ndarray
Mean longitude of Mercury (degrees)
- LVe: np.ndarray
Mean longitude of Venus (degrees)
- LMa: np.ndarray
Mean longitude of Mars (degrees)
- LJu: np.ndarray
Mean longitude of Jupiter (degrees)
- LSa: np.ndarray
Mean longitude of Saturn (degrees)
- 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\), \(N'\), and \(P_s\) [17, 42]
Follows IERS conventions for the Doodson arguments [53]
- 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)
- 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\) [9, 42, 53]
- 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)
- pyTMD.astro.schureman_arguments(P: ndarray, N: ndarray)[source]
Computes additional phase angles \(I\), \(\xi\), \(\nu\), \(R\), \(R_a\), \(\nu'\), and \(\nu''\) from Schureman [63]
See the explanation of symbols in appendix of Schureman [63]
- Parameters:
- P: np.ndarray
Mean longitude of lunar perigee (radians)
- N: np.ndarray
Mean longitude of ascending lunar node (radians)
- Returns:
- I: np.ndarray
Obliquity of lunar orbit with respect to Earth’s equator (radians)
- xi: np.ndarray
Longitude in the moon’s orbit of lunar intersection (radians)
- nu: np.ndarray
Right ascension of lunar intersection (radians)
- Qa: np.ndarray
Factor in amplitude for m1 constituent (radians)
- Qu: np.ndarray
Term in argument for m1 constituent (radians)
- Ra: np.ndarray
Factor in amplitude for l2 constituent (radians)
- Ru: np.ndarray
Term in argument for l2 constituent (radians)
- nu_p: np.ndarray
Term in argument for k1 constituent (radians)
- nu_s: np.ndarray
Term in argument for k2 constituent (radians)
- pyTMD.astro.mean_obliquity(MJD: ndarray)[source]
Mean obliquity of the ecliptic [8, 9]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- Returns:
- epsilon: np.ndarray
Mean obliquity of the ecliptic (radians)
- pyTMD.astro.equation_of_time(MJD: ndarray)[source]
Approximate calculation of the difference between apparent and mean solar times [42, 71]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- Returns:
- E: np.ndarray
Equation of time (radians)
- pyTMD.astro.solar_ecef(MJD: ndarray, ephemerides: str = 'Montenbruck', **kwargs)[source]
Wrapper function for calculating the positional coordinates of the sun in an Earth-centric, Earth-Fixed (ECEF) frame [42, 45, 51]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- ephemerides: str, default ‘Montenbruck’
Method for calculating solar ephemerides
- kwargs: dict
Keyword arguments for ephemeris calculation
- Returns:
- X, Y, Z: np.ndarray
ECEF coordinates of the sun (meters)
- pyTMD.astro.solar_approximate(MJD: ndarray, **kwargs)[source]
Computes approximate positional coordinates of the sun in an Earth-centric, Earth-Fixed (ECEF) frame [42, 45]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- ephemerides: str, default ‘Montenbruck’
Method for calculating solar ephemerides
- Returns:
- X, Y, Z: np.ndarray
ECEF coordinates of the sun (meters)
- 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 [42, 51]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- kernel: str or pathlib.Path
Path to JPL ephemerides kernel file
- include_aberration: bool, default False
Correct for aberration effects
- Returns:
- X, Y, Z: np.ndarray
ECEF coordinates of the sun (meters)
- pyTMD.astro.solar_latitude(MJD: ndarray, **kwargs)[source]
Calculates the geocentric latitude of the sun [7, 42]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- ephemerides: str, default Meeus
Method for calculating the latitude
- Returns:
- beta: np.ndarray
Latitude of the sun (radians)
- pyTMD.astro.solar_longitude(MJD: ndarray, include_aberration: bool = True, **kwargs)[source]
Calculates the apparent longitude of the sun [7, 33, 42]
- Parameters:
- Returns:
- H: np.ndarray
Longitude of the sun (radians)
- pyTMD.astro.solar_distance(MJD: ndarray, AU: float = 149597870700.0, **kwargs)[source]
Calculates the distance from the sun to the Earth [7, 33, 42]
- Parameters:
- Returns:
- R: np.ndarray
Distance from the sun to the Earth (meters)
- pyTMD.astro.lunar_ecef(MJD: ndarray, ephemerides: str = 'Montenbruck', **kwargs)[source]
Wrapper function for calculating the positional coordinates of the moon in an Earth-centric, Earth-Fixed (ECEF) frame [42, 45, 51]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- ephemerides: str, default ‘Montenbruck’
Method for calculating lunar ephemerides
- kwargs: dict
Keyword arguments for ephemeris calculation
- Returns:
- X, Y, Z: np.ndarray
ECEF coordinates of the moon (meters)
- pyTMD.astro.lunar_approximate(MJD: ndarray, **kwargs)[source]
Computes approximate positional coordinates of the moon in an Earth-centric, Earth-Fixed (ECEF) frame [42, 45]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- ephemerides: str, default ‘Montenbruck’
Method for calculating lunar positions
- Returns:
- X, Y, Z: np.ndarray
ECEF coordinates of the moon (meters)
- 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 [42, 51]
- Parameters:
- MJD: np.ndarray
Modified Julian Day (MJD) of input date
- kernel: str or pathlib.Path
Path to JPL ephemerides kernel file
- include_aberration: bool, default False
Correct for aberration effects
- Returns:
- X, Y, Z: np.ndarray
ECEF coordinates of the moon (meters)
- pyTMD.astro.lunar_distance(MJD: ndarray, a_axis: float = 6378137.0, **kwargs)[source]
Calculate the geocentric distance from the moon to the Earth [33, 42]
- Parameters:
- Returns:
- R: np.ndarray
Distance from the moon to the Earth (meters)
- pyTMD.astro.gast(T: float | ndarray)[source]
Greenwich Apparent Sidereal Time (GAST) [8, 9, 53]
- Parameters:
- T: np.ndarray
Centuries since 2000-01-01T12:00:00
- pyTMD.astro.itrs(T: float | ndarray, include_polar_motion: bool = True)[source]
International Terrestrial Reference System (ITRS) [8, 9, 53]
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
- include_polar_motion: bool, default True
Include polar motion in the rotation matrix
- pyTMD.astro._eqeq_complement(T: float | ndarray)[source]
Compute complementary terms of the equation of the equinoxes [8, 9, 53]
These include the combined effects of precession and nutation [30, 53, 71]
- Parameters:
- T: np.ndarray
Centuries since 2000-01-01T12:00:00
- pyTMD.astro._icrs_rotation_matrix(T: float | ndarray, include_polar_motion: bool = True)[source]
Rotation matrix for transforming from the International Celestial Reference System (ICRS) to the International Terrestrial Reference System (ITRS) [8, 9, 53]
- Parameters:
- T: np.ndarray
Centuries since 2000-01-01T12:00:00
- include_polar_motion: bool, default True
Include polar motion in the rotation matrix
- pyTMD.astro._frame_bias_matrix()[source]
Frame bias rotation matrix for converting from a dynamical reference system to the International Celestial Reference System (ICRS) [53, 71]
- pyTMD.astro._nutation_angles(T: float | ndarray)[source]
Calculate nutation rotation angles using tables from IERS Conventions [53]
- 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
- pyTMD.astro._nutation_matrix(mean_obliquity: float | ndarray, true_obliquity: float | ndarray, psi: float | ndarray)[source]
Nutation rotation matrix [31, 53]
- 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 | ndarray)[source]
Polar motion (Earth Orientation Parameters) rotation matrix [53, 71]
- Parameters:
- T: np.ndarray
Centuries since 2000-01-01T12:00:00
- pyTMD.astro._precession_matrix(T: float | ndarray)[source]
Precession rotation matrix [8, 9, 34]
- Parameters:
- T: np.ndarray
Centuries since 2000-01-01T12:00:00
- pyTMD.astro._correct_aberration(position: ndarray, velocity: ndarray)[source]
Correct a relative position for aberration effects [31]
- Parameters:
- position: np.ndarray
Position vector (astronomical units)
- velocity: np.ndarray
Velocity vector (astronomical units per day)
- pyTMD.astro._meeus_table_47A()[source]
Coefficients for the periodic terms in lunar longitude and distance from Table 47.A of Meeus [42]
- pyTMD.astro._meeus_table_47B()[source]
Coefficients for the sine and cosine terms in lunar latitude from Table 47.B of Meeus [42]
- pyTMD.astro._parse_table_5_2e()[source]
Parse table with expressions for Greenwich Sidereal Time provided in Chapter 5 of Petit and Luzum [53]