Ang_Distance¶
-
cosmo_utils.utils.geometry.Ang_Distance(ra1, ra2, dec1, dec2, unit='deg', method='haversine')[source] [edit on github]¶ Calculates angular separation between two sets of points with given right ascensions and declinations.
Taken from: https://en.wikipedia.org/wiki/Haversine_formula
Parameters: ra1, ra2 : float
Right Ascension of the 1st and 2nd points. Units in
degreesby default.dec1, dec2 : float
Declination of the 1st and 2nd points. Units in
degreesby default.unit : {‘dec’,’rad’} str, optional
Unit of
ra1,ra2,dec1, anddec2. This will also determine the final unit that outputs this function.method : {‘haversine’, ‘astropy’} str, optional
Method to use in order to calculate angular separation. This variable is to by default to the
haversinemethod. Ifastropy, it will use the astropy framework to determine the angular separation.Returns: ang_sep : float
Angular separation between 1st and 2nd point. In units of
degrees.Notes
A = 90. -
dec2B = 90. -dec1D =ra1-ra2c = Angle between two points