'Computes angular offsets to go *from* this coordinate *to* another.
Parameters
tocoord : `~astropy.coordinates.BaseCoordinateFrame`
The coordinate to offset to.
Returns
lon_offset : `~astropy.coordinates.Angle`
The angular offset in the longitude direction (i.e., RA for
equatorial coordinates).
lat_offset : `~astropy.coordinates.Angle`
The angular offset in the latitude direction (i.e., Dec for
equatorial coordinates).
Raises
ValueError
If the ``tocoord`` is not in the same frame as this one. This is
different from the behavior of the `separation`/`separation_3d`
methods because the offset components depend critically on the
specific choice of frame.
Notes
This uses the sky offset frame machinery, and hence will produce a new
sky offset frame if one does not already exist for this object\'s frame
class.
See Also
separation : for the *total* angular offset (not broken out into components)'

def spherical_offsets_to(self, tocoord):

    if (not self.is_equivalent_frame(tocoord)):
        raise ValueError(u'Tried    to    use    spherical_offsets_to    with    two    non-matching    frames!')
    aframe = self.skyoffset_frame()
    acoord = tocoord.transform_to(aframe)
    dlon = acoord.spherical.lon.view(Angle)
    dlat = acoord.spherical.lat.view(Angle)
    return (dlon, dlat)
