code: def azel2radec(
      az_deg: float,
      el_deg: float,
      lat_deg: float,
      lon_deg: float,
      time: datetime,
  ) -> tuple[float, float]:
      """
      converts azimuth, elevation to right ascension, declination
  
      Parameters
      ----------
  
      az_deg : float
          azimuth (clockwise) to point [degrees]
      el_deg : float
          elevation above horizon to point [degrees]
      lat_deg : float
          observer WGS84 latitude [degrees]
      lon_deg : float
          observer WGS84 longitude [degrees]
      time : datetime.datetime
          time of observation
  
  
      Results
      -------
  
      ra_deg : float
          right ascension to target [degrees]
      dec_deg : float
          declination of target [degrees]
  
      from D.Vallado Fundamentals of Astrodynamics and Applications
      p.258-259
      """
  
      if abs(lat_deg) > 90:
          raise ValueError("-90 <= lat <= 90")
  
      az = radians(az_deg)
      el = radians(el_deg)
      lat = radians(lat_deg)
      lon = radians(lon_deg)
      # %% Vallado "algorithm 28" p 268
      dec = asin(sin(el) * sin(lat) + cos(el) * cos(lat) * cos(az))
  
      lha = atan2(
          -(sin(az) * cos(el)) / cos(dec),
          (sin(el) - sin(lat) * sin(dec)) / (cos(dec) * cos(lat)),
      )
  
      lst = datetime2sidereal(time, lon)  # lon, ra in RADIANS
  
      """ by definition right ascension [0, 360) degrees """
      return degrees(lst - lha) % 360, degrees(dec)
  
imports: from __future__ import annotations
  from datetime import datetime
  from .mathfun import asin, atan2, cos, degrees, radians, sin
  from .sidereal import datetime2sidereal
label_desc: Use image node_id 1 for calling a global function with example usage: azel2radec(az_deg, el_deg, lat_deg, lon_deg, time) and returns: unknown,  degrees