matvis.conversions.enu_to_az_za#
- matvis.conversions.enu_to_az_za(enu_e, enu_n, orientation='astropy', periodic_azimuth=True)[source]#
Convert angle cosines in ENU coordinates into azimuth and zenith angle.
For a pointing vector in East-North-Up (ENU) coordinates vec{p}, the input arguments are
enu_e = vec{p}.hat{e}
andenu_n = vec{p}.hat{n}`, where ``hat{e}
is a unit vector in ENU coordinates etc.For a drift-scan telescope pointing at the zenith, the
hat{e}
direction is aligned with theU
direction (in the UVW plane), which means that we can identify the direction cosinesl = enu_e
andm = enu_n
.Azimuth is oriented East of North, i.e. Az(N) = 0 deg, Az(E) = +90 deg in the astropy convention, and North of East, i.e. Az(N) = +90 deg, and Az(E) = 0 deg in the UVBeam convention.
- Parameters:
enu_e (array_like) – Normalized angle cosine coordinates on the interval (-1, +1).
enu_n (array_like) – Normalized angle cosine coordinates on the interval (-1, +1).
orientation (str, optional) – Orientation convention used for the azimuth angle. The default is
'astropy'
, which uses an East of North convention (Az(N) = 0 deg, Az(E) = +90 deg). Alternatively, the'uvbeam'
convention uses North of East (Az(N) = +90 deg, Az(E) = 0 deg).periodic_azimuth (bool, optional) – if True, constrain az to be betwee 0 and 2 * pi This avoids the issue that arctan2 outputs angles between -pi and pi while most CST beam formats store azimuths between 0 and 2pi which leads interpolation domain mismatches.
- Returns:
az, za – Corresponding azimuth and zenith angles (in radians).
- Return type:
array_like