code: def eqCoords(lon, lat):
      
      # Convert to radians
      _lambda = math.radians(lon)
      _beta = math.radians(lat)
      _epson = math.radians(23.44)  # The earth's inclination
      
      # Declination in radians
      decl = math.asin(math.sin(_epson) * math.sin(_lambda) * math.cos(_beta) + \
             math.cos(_epson) * math.sin(_beta))
      
      # Equatorial Distance in radians
      ED = math.acos(math.cos(_lambda) * math.cos(_beta) / math.cos(decl))
      
      # RA in radians
      ra = ED if lon < 180 else math.radians(360) - ED
      
      # Correctness of RA if longitude is close to 0º or 180º in a radius of 5º
      if (abs(angle.closestdistance(lon, 0)) < 5 or 
          abs(angle.closestdistance(lon, 180)) < 5):
              a = math.sin(ra) * math.cos(decl)
              b = math.cos(_epson) * math.sin(_lambda) * math.cos(_beta) - \
                  math.sin(_epson) * math.sin(_beta)
              if (math.fabs(a-b) > 0.0003):
                  ra = math.radians(360) - ra
                  
      return (math.degrees(ra), math.degrees(decl))
docs: Converts from ecliptical to equatorial coordinates. 
      This algorithm is described in book 'Primary Directions', 
      pp. 147-150.