get_earth

sunpy.coordinates.ephemeris.get_earth(time='now', *, include_velocity=False)[source]

Return a SkyCoord for the location of the Earth at a specified time in the HeliographicStonyhurst frame. The longitude will be zero by definition.

Parameters

time (tuple, list, str, pandas.Timestamp, pandas.Series, pandas.DatetimeIndex, datetime.datetime, datetime.date, numpy.datetime64, numpy.ndarray, astropy.time.Time) – Time to use in a parse_time-compatible format

Keyword Arguments

include_velocity (bool) – If True, include the Earth’s velocity in the output coordinate. Defaults to False.

Returns

out (SkyCoord) – Location of the Earth in the HeliographicStonyhurst frame

Notes

The Earth’s velocity in the output coordinate will invariably be negligible because the HeliographicStonyhurst frame rotates in time such that the XZ-plane tracks Earth.

Examples

>>> from sunpy.coordinates.ephemeris import get_earth
>>> get_earth('2001-02-03 04:05:06')
<SkyCoord (HeliographicStonyhurst: obstime=2001-02-03T04:05:06.000): (lon, lat, radius) in (deg, deg, AU)
    (0., -6.18656962, 0.98567647)>
>>> get_earth('2001-02-03 04:05:06', include_velocity=True)
<SkyCoord (HeliographicStonyhurst: obstime=2001-02-03T04:05:06.000): (lon, lat, radius) in (deg, deg, AU)
    (0., -6.18656962, 0.98567647)
 (d_lon, d_lat, d_radius) in (arcsec / s, arcsec / s, km / s)
    (0., 0., 0.)>
>>> get_earth('2001-02-03 04:05:06', include_velocity=True).transform_to('heliocentricinertial')
<SkyCoord (HeliocentricInertial: obstime=2001-02-03T04:05:06.000): (lon, lat, distance) in (deg, deg, AU)
    (58.41594489, -6.18656962, 0.98567647)
 (d_lon, d_lat, d_distance) in (arcsec / s, arcsec / s, km / s)
    (0.0424104, 0., 0.)>