'Light travel time correction to the barycentre or heliocentre.
The frame transformations used to calculate the location of the solar
system barycentre and the heliocentre rely on the erfa routine epv00,
which is consistent with the JPL DE405 ephemeris to an accuracy of
11.2 km, corresponding to a light travel time of 4 microseconds.
The routine assumes the source(s) are at large distance, i.e., neglects
finite-distance effects.
Parameters
skycoord : `~astropy.coordinates.SkyCoord`
The sky location to calculate the correction for.
kind : str, optional
``\'barycentric\'`` (default) or ``\'heliocentric\'``
location : `~astropy.coordinates.EarthLocation`, optional
The location of the observatory to calculate the correction for.
If no location is given, the ``location`` attribute of the Time
object is used
ephemeris : str, optional
Solar system ephemeris to use (e.g., \'builtin\', \'jpl\'). By default,
use the one set with ``astropy.coordinates.solar_system_ephemeris.set``.
For more information, see `~astropy.coordinates.solar_system_ephemeris`.
Returns
time_offset : `~astropy.time.TimeDelta`
The time offset between the barycentre or Heliocentre and Earth,
in TDB seconds.  Should be added to the original time to get the
time in the Solar system barycentre or the Heliocentre.'

def light_travel_time(self, skycoord, kind=u'barycentric', location=None, ephemeris=None):

    if (kind.lower() not in (u'barycentric', u'heliocentric')):
        raise ValueError(u"'kind'    parameter    must    be    one    of    'heliocentric'    or    'barycentric'")
    if (location is None):
        if (self.location is None):
            raise ValueError(u'An    EarthLocation    needs    to    be    set    or    passed    in    to    calculate    bary-    or    heliocentric    corrections')
        location = self.location
    from ..coordinates import UnitSphericalRepresentation, CartesianRepresentation, HCRS, ICRS, GCRS, solar_system_ephemeris
    if (not skycoord.is_transformable_to(ICRS())):
        raise ValueError(u'Given    skycoord    is    not    transformable    to    the    ICRS')
    try:
        itrs = location.get_itrs(obstime=self)
    except Exception:
        raise ValueError(u'Supplied    location    does    not    have    a    valid    `get_itrs`    method')
    with solar_system_ephemeris.set(ephemeris):
        if (kind.lower() == u'heliocentric'):
            cpos = itrs.transform_to(HCRS(obstime=self)).cartesian.xyz
        else:
            gcrs_coo = itrs.transform_to(GCRS(obstime=self))
            cpos = gcrs_coo.transform_to(ICRS()).cartesian.xyz
    spos = skycoord.icrs.represent_as(UnitSphericalRepresentation).represent_as(CartesianRepresentation).xyz
    cpos = np.rollaxis(cpos, 0, cpos.ndim)
    spos = np.rollaxis(spos, 0, spos.ndim)
    tcor_val = ((spos * cpos).sum(axis=(-1)) / const.c)
    return TimeDelta(tcor_val, scale=u'tdb')
