get_earth#
- sunpy.coordinates.get_earth(time='now', *, include_velocity=False)[source]#
Return a
SkyCoord
for the location of the Earth at a specified time in theHeliographicStonyhurst
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 formatinclude_velocity (
bool
, optional) – If True, include the Earth’s velocity in the output coordinate. Defaults to False.
- Returns:
out (
SkyCoord
) – Location of the Earth in theHeliographicStonyhurst
frame
Notes
The Earth’s velocity in the output coordinate will invariably be negligible in the longitude direction because the
HeliographicStonyhurst
frame rotates in time such that the plane of zero longitude (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, rsun=695700.0 km): (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, rsun=695700.0 km): (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) (6.42643739e-11, -0.00279484, 0.24968506)> >>> 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.00279484, 0.2496851)>