def frequency_to_band(freq):
  """
  band code from frequency in GHz
  """
  if                  freq  <  1:   return None
  elif freq >= 1   and freq <  2:   return "L"
  elif freq >= 2   and freq <  4:   return "S"
  elif freq >= 4   and freq <  8:   return "C"
  elif freq >= 8   and freq < 12:   return "X"
  elif freq >=12   and freq < 18:   return "Ka"
  elif freq >=18   and freq < 26.5: return "K"
  elif freq >=26.5 and freq < 40:   return "Ka"
  elif freq >=40   and freq < 50:   return "Q"
  elif freq >=50   and freq < 75:   return "V"
  elif freq >=75   and freq <115:   return "W"
  else:                             return "D"