Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def response(self, azalt, pol='x'):
"""Return the total antenna response to a source at azalt=(az, alt),
including beam response, per-frequency gain, and a phase offset."""
zang = ephem.separation(self.pointing, azalt)
beam_resp = self.beam.response(zang, azalt[0], pol=pol)
return beam_resp * self.gain