nenupy.astro.astro_tools.radec_to_altaz
- nenupy.astro.astro_tools.radec_to_altaz(radec, time, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>, fast_compute=True)[source]
Converts a celestial object equatorial coordinates to horizontal coordinates.
If
fast_compute=Trueis selected, the computation is accelerated using Local Sidereal Time approximation (seelocal_sidereal_time()). The altitude \(\theta\) and azimuth \(\varphi\) are computed as follows:\[\begin{split}\cases{ \sin(\theta) = \sin(\delta) \sin(l) + \cos(\delta) \cos(l) \cos(h)\\ \cos(\varphi) = \frac{\sin(\delta) - \sin(l) \sin(\theta)}{\cos(l)\cos(\varphi)} }\end{split}\]with \(\delta\) the object’s declination, \(l\) the
observer’s latitude and \(h\) the Local Hour Angle (seehour_angle()). If \(\sin(h) \geq 0\), then \(\varphi = 2 \pi - \varphi\). Otherwise,transform_to()is used.- Parameters:
radec (
SkyCoord) – Celestial object equatorial coordinates.time (
Time) – Coordinated universal time.observer (
EarthLocation) – Earth location where the observer is at. Default is NenuFAR’s position.fast_compute (
bool) – If set toTrue, it enables faster computation time for the conversion, mainly relying on an approximation of the local sidereal time. All other values would lead to accurate coordinates computation. Differences in coordinates values are of the order of \(10^{-2}\) degrees or less.
- Returns:
Celestial object’s horizontal coordinates. If either
radecortimeare 1D arrays, the resulting object will be of shape(time, positions).- Return type:
- Example:
from nenupy.astro import radec_to_altaz from astropy.time import Time from astropy.coordinates import SkyCoord altaz = radec_to_altaz( radec=SkyCoord([300, 200], [45, 45], unit="deg"), time=Time("2022-01-01T12:00:00"), fast_compute=True )