'Computes three dimensional separation between this coordinate
and another.
For more on how to use this (and related) functionality, see the
examples in :doc:`/coordinates/matchsep`.
Parameters
other : `~astropy.coordinates.SkyCoord` or `~astropy.coordinates.BaseCoordinateFrame`
The coordinate to get the separation to.
Returns
sep : `~astropy.coordinates.Distance`
The real-space distance between these two coordinates.
Raises
ValueError
If this or the other coordinate do not have distances.'

def separation_3d(self, other):

    if (not self.is_equivalent_frame(other)):
        try:
            other = other.transform_to(self, merge_attributes=False)
        except TypeError:
            raise TypeError(u'Can    only    get    separation    to    another    SkyCoord    or    a    coordinate    frame    with    data')
    if issubclass(self.data.__class__, UnitSphericalRepresentation):
        raise ValueError(u'This    object    does    not    have    a    distance;    cannot    compute    3d    separation.')
    if issubclass(other.data.__class__, UnitSphericalRepresentation):
        raise ValueError(u'The    other    object    does    not    have    a    distance;    cannot    compute    3d    separation.')
    return Distance((self.cartesian - other.cartesian).norm())
