'Transform this object\'s coordinate data to a new frame.
Parameters
new_frame : class or frame object or SkyCoord object
The frame to transform this coordinate frame into.
Returns
transframe
A new object with the coordinate data represented in the
``newframe`` system.
Raises
ValueError
If there is no possible transformation route.'

def transform_to(self, new_frame):

    from .errors import ConvertError
    if (self._data is None):
        raise ValueError(u'Cannot    transform    a    frame    with    no    data')
    if (getattr(self.data, u'differentials', None) and hasattr(self, u'obstime') and hasattr(new_frame, u'obstime') and np.any((self.obstime != new_frame.obstime))):
        raise NotImplementedError(u'You    cannot    transform    a    frame    that    has    velocities    to    another    frame    at    a    different    obstime.    If    you    think    this    should    (or    should    not)    be    possible,    please    comment    at    https://github.com/astropy/astropy/issues/6280')
    if inspect.isclass(new_frame):
        new_frame = new_frame()
    if hasattr(new_frame, u'_sky_coord_frame'):
        new_frame = new_frame._sky_coord_frame
    trans = frame_transform_graph.get_transform(self.__class__, new_frame.__class__)
    if (trans is None):
        if (new_frame is self.__class__):
            return new_frame.realize_frame(self.data)
        msg = u'Cannot    transform    from    {0}    to    {1}'
        raise ConvertError(msg.format(self.__class__, new_frame.__class__))
    return trans(self, new_frame)
