Moon — PyMeeus 0.5.12 documentation

# Moon

Module holding functions to handle coordinates.

class pymeeus.Moon.Moon

  Class Moon models Earth’s satellite.

  __weakref__

    list of weak references to the object (if defined)

  static apparent_ecliptical_pos(epoch)

    This method computes the apparent geocentric ecliptical position (longitude, latitude) of the Moon for a given instant, referred to the mean equinox of the date, as well as the Moon-Earth distance in kilometers and the equatorial horizontal parallax.

    Parameters

      epoch (`Epoch`) – Instant to compute the Moon’s position, as an py:class:Epoch object.

    Returns

      Tuple containing:

      - Apparent geocentric longitude of the center of the Moon, as an py:class:Epoch object.

      - Apparent geocentric latitude of the center of the Moon, as an py:class:Epoch object.

      - Distance in kilometers between the centers of Earth and Moon, in kilometers (float)

      - Equatorial horizontal parallax of the Moon, as an py:class:Epoch object.

    Return type

      tuple

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1992, 4, 12.0)
        >>> Lambda, Beta, Delta, ppi = Moon.apparent_ecliptical_pos(epoch)
        >>> print(round(Lambda, 5))
        133.16726
        >>> print(round(Beta, 6))
        -3.229126
        >>> print(round(Delta, 1))
        368409.7
        >>> print(round(ppi, 5))
        0.99199

  static apparent_equatorial_pos(epoch)

    This method computes the apparent equatorial position (right ascension, declination) of the Moon for a given instant, referred to the mean equinox of the date, as well as the Moon-Earth distance in kilometers and the equatorial horizontal parallax.

    Parameters

      epoch (`Epoch`) – Instant to compute the Moon’s position, as an py:class:Epoch object.

    Returns

      Tuple containing:

      - Apparent right ascension of the center of the Moon, as an py:class:Epoch object.

      - Apparent declination of the center of the Moon, as an py:class:Epoch object.

      - Distance in kilometers between the centers of Earth and Moon, in kilometers (float)

      - Equatorial horizontal parallax of the Moon, as an py:class:Epoch object.

    Return type

      tuple

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1992, 4, 12.0)
        >>> ra, dec, Delta, ppi = Moon.apparent_equatorial_pos(epoch)
        >>> print(round(ra, 6))
        134.688469
        >>> print(round(dec, 6))
        13.768367
        >>> print(round(Delta, 1))
        368409.7
        >>> print(round(ppi, 5))
        0.99199

  static geocentric_ecliptical_pos(epoch)

    This method computes the geocentric ecliptical position (longitude, latitude) of the Moon for a given instant, referred to the mean equinox of the date, as well as the Moon-Earth distance in kilometers and the equatorial horizontal parallax.

    Parameters

      epoch (`Epoch`) – Instant to compute the Moon’s position, as an py:class:Epoch object.

    Returns

      Tuple containing:

      - Geocentric longitude of the center of the Moon, as an py:class:Epoch object.

      - Geocentric latitude of the center of the Moon, as an py:class:Epoch object.

      - Distance in kilometers between the centers of Earth and Moon, in kilometers (float)

      - Equatorial horizontal parallax of the Moon, as an py:class:Epoch object.

    Return type

      tuple

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1992, 4, 12.0)
        >>> Lambda, Beta, Delta, ppi = Moon.geocentric_ecliptical_pos(epoch)
        >>> print(round(Lambda, 6))
        133.162655
        >>> print(round(Beta, 6))
        -3.229126
        >>> print(round(Delta, 1))
        368409.7
        >>> print(round(ppi, 5))
        0.99199

  static illuminated_fraction_disk(epoch)

    This method computes the approximate illuminated fraction ‘k’ of the disk of the Moon. The method used has a relatively low accuracy, but it is enough to the 2nd decimal place.

    Parameters

      epoch (`Epoch`) – Instant to compute the Moon’s illuminated fraction of the disk, as a py:class:Epoch object.

    Returns

      The approximate illuminated fraction of the Moon’s disk.

    Return type

      float

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1992, 4, 12.0)
        >>> k = Moon.illuminated_fraction_disk(epoch)
        >>> print(round(k, 2))
        0.68

  static longitude_mean_ascending_node(epoch)

    This method computes the longitude of the mean ascending node of the Moon in degrees, for a given instant, measured from the mean equinox of the date.

    Parameters

      epoch (`Epoch`) – Instant to compute the Moon’s mean ascending node, as an py:class:Epoch object.

    Returns

      The longitude of the mean ascending node.

    Return type

      py:class:Angle

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1913, 5, 27.0)
        >>> Omega = Moon.longitude_mean_ascending_node(epoch)
        >>> print(round(Omega, 1))
        0.0
        >>> epoch = Epoch(2043, 9, 10.0)
        >>> Omega = Moon.longitude_mean_ascending_node(epoch)
        >>> print(round(Omega, 1))
        0.0
        >>> epoch = Epoch(1959, 12, 7.0)
        >>> Omega = Moon.longitude_mean_ascending_node(epoch)
        >>> print(round(Omega, 1))
        180.0
        >>> epoch = Epoch(2108, 11, 3.0)
        >>> Omega = Moon.longitude_mean_ascending_node(epoch)
        >>> print(round(Omega, 1))
        180.0

  static longitude_mean_perigee(epoch)

    This method computes the longitude of the mean perigee of the lunar orbitn in degrees, for a given instant, measured from the mean equinox of the date.

    Parameters

      epoch (`Epoch`) – Instant to compute the Moon’s mean perigee, as an py:class:Epoch object.

    Returns

      The longitude of the mean perigee.

    Return type

      py:class:Angle

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(2021, 3, 5.0)
        >>> Pi = Moon.longitude_mean_perigee(epoch)
        >>> print(round(Pi, 5))
        224.89194

  static longitude_true_ascending_node(epoch)

    This method computes the longitude of the true ascending node of the Moon in degrees, for a given instant, measured from the mean equinox of the date.

    Parameters

      epoch (`Epoch`) – Instant to compute the Moon’s true ascending node, as an py:class:Epoch object.

    Returns

      The longitude of the true ascending node.

    Return type

      py:class:Angle

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1913, 5, 27.0)
        >>> Omega = Moon.longitude_true_ascending_node(epoch)
        >>> print(round(Omega, 4))
        0.8763

  static moon_librations(epoch)

    This method computes the librations in longitude and latitude of the moon. There are several librations: The optical librations, that are the apparent oscillations in the hemisphere that the Moon turns towards the Earth, due to variations in the geometric position of the Earth relative to the lunar surface during the course of the orbital motion of the Moon. These variations allow to observe about 59% of the surface of the Moon from the Earth.

    There is also the physical libration of the Moon, i.e., the libration due to the actual rotational motion of the Moon about its mean rotation. The physical libration is much smaller than the optical libration, and can never be larger than 0.04 degree in both longitude and latitude.

    Finally, there is the total libration, which is the sum of the two librations mentioned above

    Parameters

      epoch – Epoch we want to compute the Moon’s librations.

    Returns

      A tuple containing the optical libration in longitude and in latitude, the physical libration also in longitude and latitude, and the total librations which is the sum of the previouse ones, all of them as `Angle` objects.

    Return type

      tuple

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1992, 4, 12.0)
        >>> lopt, bopt, lphys, bphys, ltot, btot = Moon.moon_librations(epoch)
        >>> print(round(lopt, 3))
        -1.206
        >>> print(round(bopt, 3))
        4.194
        >>> print(round(lphys, 3))
        -0.025
        >>> print(round(bphys, 3))
        0.006
        >>> print(round(ltot, 2))
        -1.23
        >>> print(round(btot, 3))
        4.2

  static moon_maximum_declination(epoch, target='northern')

    This method computes the approximate times when the Moon reaches its maximum declination (either ‘northern’ or ‘southern’), as well as the values of these extreme declinations. The resulting times will be expressed in the uniform time scale of Dynamical Time (TT).

    Parameters

      - epoch – Approximate epoch we want to compute the Moon’s maximum declination.

      - target (str) – Either ‘northern’ or ‘southern’, depending on the maximum declination being looked for. It is ‘northern’ by default.

    Returns

      A tuple containing the instant of time when the maximum declination happens, as a `Epoch` object, and the angle value of such declination, as a `Angle` object.

    Return type

      tuple

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1988, 12, 15.0)
        >>> epo, dec = Moon.moon_maximum_declination(epoch)
        >>> y, m, d, h, mi, s = epo.get_full_date()
        >>> print("{}/{}/{} {}:0{}".format(y, m, d, h, mi))
        1988/12/22 20:01
        >>> print("{}".format(dec.dms_str(n_dec=0)))
        28d 9' 22.0''
        >>> epoch = Epoch(2049, 4, 15.0)
        >>> epo, dec = Moon.moon_maximum_declination(epoch, target='southern')
        >>> y, m, d, h, mi, s = epo.get_full_date()
        >>> print("{}/{}/{} {}:{}".format(y, m, d, h, mi))
        2049/4/21 14:0
        >>> print("{}".format(dec.dms_str(n_dec=0)))
        -22d 8' 18.0''
        >>> epoch = Epoch(-4, 3, 15.0)
        >>> epo, dec = Moon.moon_maximum_declination(epoch, target='northern')
        >>> y, m, d, h, mi, s = epo.get_full_date()
        >>> print("{}/{}/{} {}h".format(y, m, d, h))
        -4/3/16 15h
        >>> print("{}".format(dec.dms_str(n_dec=0)))
        28d 58' 26.0''

  static moon_passage_nodes(epoch, target='ascending')

    This method computes the approximate times when the center of the Moon passes through the ascending or descending node of its orbit. The resulting times will be expressed in the uniform time scale of Dynamical Time (TT).

    Parameters

      - epoch – Approximate epoch we want to compute the Moon’s passage through the ascending or descending node.

      - target (str) – Either ‘ascending’ or ‘descending’. It is ‘ascending’ by default.

    Returns

      The instant of time when the Moon passes thhrough the ascending or descending node.

    Return type

      `Epoch`

    Raises

      TypeError if input values are of wrong type.

    Raises

      ValueError if ‘target’ value is invalid.

        >>> epoch = Epoch(1987, 5, 15.0)
        >>> passage = Moon.moon_passage_nodes(epoch, target="ascending")
        >>> y, m, d, h, mi, s = passage.get_full_date()
        >>> mi += s/60.0
        >>> print("{}/{}/{} {}:{}".format(y, m, d, h, round(mi)))
        1987/5/23 6:26

  static moon_perigee_apogee(epoch, target='perigee')

    This method computes the approximate times when the distance between the Earth and the Moon is a minimum (perigee) or a maximum (apogee). The resulting times will be expressed in the uniform time scale of Dynamical Time (TT).

    Parameters

      - epoch – Approximate epoch we want to compute the Moon’s perigee or apogee for.

      - target (str) – Either ‘perigee’ or ‘apogee’. It’s ‘perigee’ by default.

    Returns

      A tuple containing the instant of time when the perigee or apogee happens, as a `Epoch` object, and the Moon’s corresponding equatorial horizontal parallax, as a `Angle` object.

    Return type

      tuple

    Raises

      TypeError if input values are of wrong type.

    Raises

      ValueError if ‘target’ value is invalid.

        >>> epoch = Epoch(1988, 10, 1.0)
        >>> apogee, parallax = Moon.moon_perigee_apogee(epoch, target="apogee")
        >>> y, m, d, h, mi, s = apogee.get_full_date()
        >>> print("{}/{}/{} {}:{}".format(y, m, d, h, mi))
        1988/10/7 20:30
        >>> print("{}".format(parallax.dms_str(n_dec=3)))
        54' 0.679''

  static moon_phase(epoch, target='new')

    This method computes the time of the phase of the moon closest to the provided epoch. The resulting time is expressed in the uniform time scale of Dynamical Time (TT).

    Parameters

      - epoch – Approximate epoch we want to compute the Moon phase for.

      - target (str) – Corresponding phase. It can be “new” (New Moon), “first” (First Quarter), “full” (Full Moon) and “last” (Last Quarter). It is ‘new’ by default.

    Returns

      The instant of time when the provided phase happens.

    Return type

      `Epoch`

    Raises

      TypeError if input values are of wrong type.

    Raises

      ValueError if ‘target’ value is invalid.

        >>> epoch = Epoch(1977, 2, 15.0)
        >>> new_moon = Moon.moon_phase(epoch, target="new")
        >>> y, m, d, h, mi, s = new_moon.get_full_date()
        >>> print("{}/{}/{} {}:{}:{}".format(y, m, d, h, mi, round(s, 0)))
        1977/2/18 3:37:42.0
        >>> epoch = Epoch(2044, 1, 1.0)
        >>> new_moon = Moon.moon_phase(epoch, target="last")
        >>> y, m, d, h, mi, s = new_moon.get_full_date()
        >>> print("{}/{}/{} {}:{}:{}".format(y, m, d, h, mi, round(s)))
        2044/1/21 23:48:17

  static moon_position_angle_axis(epoch)

    This method computes the position angle of the Moon’s axis of rotation. The effect of the physical libration is taken into account.

    Parameters

      epoch – Epoch we want to compute the position angle of the Moon’s axis of rotation.

    Returns

      The position angle of the Moon’s axis of rotation, as a `Angle` object.

    Return type

      tuple

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1992, 4, 12.0)
        >>> p = Moon.moon_position_angle_axis(epoch)
        >>> print(round(p, 2))
        15.08

  static position_bright_limb(epoch)

    This method computes the position angle of the Moon’s bright limb, i.e., the position angle of the midpoint of the illuminated limb, reckoned eastward from the North Point of the disk (not from the axis of rotation of the lunar globe).

    Parameters

      epoch (`Epoch`) – Instant to compute the position angle of the Moon’s bright limb, as a py:class:Epoch object.

    Returns

      The position angle of the Moon’s bright limb.

    Return type

      `Angle`

    Raises

      TypeError if input value is of wrong type.

        >>> epoch = Epoch(1992, 4, 12.0)
        >>> xi = Moon.position_bright_limb(epoch)
        >>> print(round(xi, 1))
        285.0

pymeeus.Moon.PERIODIC_TERMS_B_TABLE = [[0, 0, 0, 1, 5128122.0], [0, 0, 1, 1, 280602.0], [0, 0, 1, -1, 277693.0], [2, 0, 0, -1, 173237.0], [2, 0, -1, 1, 55413.0], [2, 0, -1, -1, 46271.0], [2, 0, 0, 1, 32573.0], [0, 0, 2, 1, 17198.0], [2, 0, 1, -1, 9266.0], [0, 0, 2, -1, 8822.0], [2, -1, 0, -1, 8216.0], [2, 0, -2, -1, 4324.0], [2, 0, 1, 1, 4200.0], [2, 1, 0, -1, -3359.0], [2, -1, -1, 1, 2463.0], [2, -1, 0, 1, 2211.0], [2, -1, -1, -1, 2065.0], [0, 1, -1, -1, -1870.0], [4, 0, -1, -1, 1828.0], [0, 1, 0, 1, -1794.0], [0, 0, 0, 3, -1749.0], [0, 1, -1, 1, -1565.0], [1, 0, 0, 1, -1491.0], [0, 1, 1, 1, -1475.0], [0, 1, 1, -1, -1410.0], [0, 1, 0, -1, -1344.0], [1, 0, 0, -1, -1335.0], [0, 0, 3, 1, 1107.0], [4, 0, 0, -1, 1021.0], [4, 0, -1, 1, 833.0], [0, 0, 1, -3, 777.0], [4, 0, -2, 1, 671.0], [2, 0, 0, -3, 607.0], [2, 0, 2, -1, 596.0], [2, -1, 1, -1, 491.0], [2, 0, -2, 1, -451.0], [0, 0, 3, -1, 439.0], [2, 0, 2, 1, 422.0], [2, 0, -3, -1, 421.0], [2, 1, -1, 1, -366.0], [2, 1, 0, 1, -351.0], [4, 0, 0, 1, 331.0], [2, -1, 1, 1, 315.0], [2, -2, 0, -1, 302.0], [0, 0, 1, 3, -283.0], [2, 1, 1, -1, -229.0], [1, 1, 0, -1, 223.0], [1, 1, 0, 1, 223.0], [0, 1, -2, -1, -220.0], [2, 1, -1, -1, -220.0], [1, 0, 1, 1, -185.0], [2, -1, -2, -1, 181.0], [0, 1, 2, 1, -177.0], [4, 0, -2, -1, 176.0], [4, -1, -1, -1, 166.0], [1, 0, 1, -1, -164.0], [4, 0, 1, -1, 132.0], [1, 0, -1, -1, -119.0], [4, -1, 0, -1, 115.0], [2, -2, 0, 1, 107.0]]

  This table contains the periodic terms for the latitude of the Moon Sigmab. Units are 0.000001 degree. In Meeus’ book this is Table 47.B and can be found in page 341.

pymeeus.Moon.PERIODIC_TERMS_LR_TABLE = [[0, 0, 1, 0, 6288774.0, -20905355.0], [2, 0, -1, 0, 1274027.0, -3699111.0], [2, 0, 0, 0, 658314.0, -2955968.0], [0, 0, 2, 0, 213618.0, -569925.0], [0, 1, 0, 0, -185116.0, 48888.0], [0, 0, 0, 2, -114332.0, -3149.0], [2, 0, -2, 0, 58793.0, 246158.0], [2, -1, -1, 0, 57066.0, -152138.0], [2, 0, 1, 0, 53322.0, -170733.0], [2, -1, 0, 0, 45758.0, -204586.0], [0, 1, -1, 0, -40923.0, -129620.0], [1, 0, 0, 0, -34720.0, 108743.0], [0, 1, 1, 0, -30383.0, 104755.0], [2, 0, 0, -2, 15327.0, 10321.0], [0, 0, 1, 2, -12528.0, 0.0], [0, 0, 1, -2, 10980.0, 79661.0], [4, 0, -1, 0, 10675.0, -34782.0], [0, 0, 3, 0, 10034.0, -23210.0], [4, 0, -2, 0, 8548.0, -21636.0], [2, 1, -1, 0, -7888.0, 24208.0], [2, 1, 0, 0, -6766.0, 30824.0], [1, 0, -1, 0, -5163.0, -8379.0], [1, 1, 0, 0, 4987.0, -16675.0], [2, -1, 1, 0, 4036.0, -12831.0], [2, 0, 2, 0, 3994.0, -10445.0], [4, 0, 0, 0, 3861.0, -11650.0], [2, 0, -3, 0, 3665.0, 14403.0], [0, 1, -2, 0, -2689.0, -7003.0], [2, 0, -1, 2, -2602.0, 0.0], [2, -1, -2, 0, 2390.0, 10056.0], [1, 0, 1, 0, -2348.0, 6322.0], [2, -2, 0, 0, 2236.0, -9884.0], [0, 1, 2, 0, -2120.0, 5751.0], [0, 2, 0, 0, -2069.0, 0.0], [2, -2, -1, 0, 2048.0, -4950.0], [2, 0, 1, -2, -1773.0, 4130.0], [2, 0, 0, 2, -1595.0, 0.0], [4, -1, -1, 0, 1215.0, -3958.0], [0, 0, 2, 2, -1110.0, 0.0], [3, 0, -1, 0, -892.0, 3258.0], [2, 1, 1, 0, -810.0, 2616.0], [4, -1, -2, 0, 759.0, -1897.0], [0, 2, -1, 0, -713.0, -2117.0], [2, 2, -1, 0, -700.0, 2354.0], [2, 1, -2, 0, 691.0, 0.0], [2, -1, 0, -2, 596.0, 0.0], [4, 0, 1, 0, 549.0, -1423.0], [0, 0, 4, 0, 537.0, -1117.0], [4, -1, 0, 0, 520.0, -1571.0], [1, 0, -2, 0, -487.0, -1739.0], [2, 1, 0, -2, -399.0, 0.0], [0, 0, 2, -2, -381.0, -4421.0], [1, 1, 1, 0, 351.0, 0.0], [3, 0, -2, 0, -340.0, 0.0], [4, 0, -3, 0, 330.0, 0.0], [2, -1, 2, 0, 327.0, 0.0], [0, 2, 1, 0, -323.0, 1165.0], [1, 1, -1, 0, 299.0, 0.0], [2, 0, 3, 0, 294.0, 0.0], [2, 0, -1, -2, 0.0, 8752.0]]

  This table contains the periodic terms for the longitude (Sigmal) and distance (Sigmar) of the Moon. Units are 0.000001 degree for Sigmal, and 0.001 kilometer for Sigmar. In Meeus’ book this is Table 47.A and can be found in pages 339-340.