code: def refraction(alt_degrees, temperature_C, pressure_mbar):
      
      r = 0.016667 / tan((alt_degrees + 7.31 / (alt_degrees + 4.4)) * DEG2RAD)
      d = r * (0.28 * pressure_mbar / (temperature_C + 273.0))
      return where((-1.0 <= alt_degrees) & (alt_degrees <= 89.9), d, 0.0)
docs: Given an observed altitude, return how much the image is refracted.
  
      Zero refraction is returned both for objects very near the zenith,
      as well as for objects more than one degree below the horizon.