earth_distance

sunpy.coordinates.sun.earth_distance(time='now') [edit on github]

Return the distance between the Sun and the Earth at a specified time.

Parameters

time (tuple, 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

Returns

out (Distance) – The Sun-Earth distance