def xy2angles(x,y): elout = 90-np.hypot(x,y) azout = np.degrees(np.arctan2(x,y)) return (azout,elout)