'Calculate sidereal time.
Parameters
kind : str
``\'mean\'`` or ``\'apparent\'``, i.e., accounting for precession
only, or also for nutation.
longitude : `~astropy.units.Quantity`, `str`, or `None`; optional
The longitude on the Earth at which to compute the sidereal time.
Can be given as a `~astropy.units.Quantity` with angular units
(or an `~astropy.coordinates.Angle` or
`~astropy.coordinates.Longitude`), or as a name of an
observatory (currently, only ``\'greenwich\'`` is supported,
equivalent to 0 deg).  If `None` (default), the ``lon`` attribute of
the Time object is used.
model : str or `None`; optional
Precession (and nutation) model to use.  The available ones are:
- {0}: {1}
- {2}: {3}
If `None` (default), the last (most recent) one from the appropriate
list above is used.
Returns
sidereal time : `~astropy.coordinates.Longitude`
Sidereal time as a quantity with units of hourangle'

def sidereal_time(self, kind, longitude=None, model=None):

    from ..coordinates import Longitude
    if (kind.lower() not in SIDEREAL_TIME_MODELS.keys()):
        raise ValueError(u'The    kind    of    sidereal    time    has    to    be    {0}'.format(u'    or    '.join(sorted(SIDEREAL_TIME_MODELS.keys()))))
    available_models = SIDEREAL_TIME_MODELS[kind.lower()]
    if (model is None):
        model = sorted(available_models.keys())[(-1)]
    elif (model.upper() not in available_models):
        raise ValueError(u'Model    {0}    not    implemented    for    {1}    sidereal    time;    available    models    are    {2}'.format(model, kind, sorted(available_models.keys())))
    if (longitude is None):
        if (self.location is None):
            raise ValueError(u'No    longitude    is    given    but    the    location    for    the    Time    object    is    not    set.')
        longitude = self.location.lon
    elif (longitude == u'greenwich'):
        longitude = Longitude(0.0, u.degree, wrap_angle=(180.0 * u.degree))
    else:
        longitude = Longitude(longitude, u.degree, wrap_angle=(180.0 * u.degree))
    gst = self._erfa_sidereal_time(available_models[model.upper()])
    return Longitude((gst + longitude), u.hourangle)
